Primitive type as field access expression
Ziggit
Primitive type as field access expression
why is this allowed const std = @import("std"); pub fn main() void { std.debug.print("{any}\n", .{S.bool}); // ? prints true std.debug.print("{any}\n", .{S.@"bool"}); // identifier; prints true } const S = struct { pub const @"bool" = true; };
0 comments
No comments yet.