≈ the.bay.news

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

Sign in to join the discussion — your thebay.events account works here.

No comments yet.