aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/compile_log.zig
blob: 772853b0232751c193c7316a5acb5ee1e3735a97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export fn foo() void {
    comptime bar(12, "hi",);
}
fn bar(a: i32, b: []const u8) void {
    @compileLog("begin",);
    @compileLog("a", a, "b", b);
    @compileLog("end",);
}
export fn baz() void {
    const S = struct { a: u32 };
    @compileLog(@sizeOf(S));
}

// error
// backend=llvm
// target=native
//
// :5:5: error: found compile log statement
// :11:5: note: also here