mirror of
https://github.com/ziglang/zig.git
synced 2024-12-01 09:32:31 +00:00
13 lines
262 B
Zig
13 lines
262 B
Zig
pub fn main() void {
|
|
var a: u32 = 0;
|
|
comptime var b: u32 = 0;
|
|
if (a == 0) b = 3;
|
|
}
|
|
|
|
// error
|
|
// output_mode=Exe
|
|
// target=x86_64-macos
|
|
//
|
|
// :4:21: error: store to comptime variable depends on runtime condition
|
|
// :4:11: note: runtime condition here
|