mirror of
https://github.com/ziglang/zig.git
synced 2025-12-13 17:53:07 +00:00
20 lines
381 B
Zig
20 lines
381 B
Zig
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
|