14 lines
260 B
Zig
14 lines
260 B
Zig
pub fn main() void {
|
|
var a: u32 = 0;
|
|
comptime var b: u32 = 0;
|
|
switch (a) {
|
|
0 => {},
|
|
else => b = 3,
|
|
}
|
|
}
|
|
|
|
// error
|
|
//
|
|
// :6:21: error: store to comptime variable depends on runtime condition
|
|
// :4:13: note: runtime condition here
|