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

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