mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
17 lines
326 B
Zig
17 lines
326 B
Zig
const print = @import("std").debug.print;
|
|
|
|
const num1 = blk: {
|
|
var val1: i32 = 99;
|
|
@compileLog("comptime val1 = ", val1);
|
|
val1 = val1 + 1;
|
|
break :blk val1;
|
|
};
|
|
|
|
test "main" {
|
|
@compileLog("comptime in main");
|
|
|
|
print("Runtime in main, num1 = {}.\n", .{num1});
|
|
}
|
|
|
|
// test_error=found compile log statement
|