mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
16 lines
200 B
Zig
16 lines
200 B
Zig
|
pub fn main() void {
|
||
|
var a: u32 = 0;
|
||
|
if (a == 0) {
|
||
|
comptime var b: u32 = 0;
|
||
|
b = 1;
|
||
|
}
|
||
|
}
|
||
|
comptime {
|
||
|
var x: i32 = 1;
|
||
|
x += 1;
|
||
|
if (x != 2) unreachable;
|
||
|
}
|
||
|
|
||
|
// run
|
||
|
//
|