aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/ignored_comptime_statement_value.zig
blob: 2067f3b716095ca30e0f0f1dd1d2a1c1b7aec40e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
export fn foo() void {
    comptime {
        1;
    }
}

// error
// backend=stage2
// target=native
//
// :3:9: error: value of type 'comptime_int' ignored
// :3:9: note: all non-void values must be used
// :3:9: note: this error can be suppressed by assigning the value to '_'