Zig NEWS

Discussion on: Understanding comptime var

Collapse
 
marctcruz profile image
MarcTCruz

It makes sense for me that "set_a_comptime" fails since you are calling a compiletime routine using a runtime variable in the case. If you change "some_random_num" to comptime, then it might make some sense for set_a_comptime to work, even so, "comptime a: u32" shows intention explicitily and works.