Created
April 15, 2019 16:03
-
-
Save daurnimator/b85e04aef327eda7c6ac7ade72d44cfe to your computer and use it in GitHub Desktop.
zig struct field vs method shadowing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const A = struct { | |
pub foo: i32, | |
pub fn foo() void { | |
} | |
}; | |
test "shadowing" { | |
std.debug.warn("{}", @typeName(@typeOf(A.foo))); // fn() void | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ziglang/zig#705