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

// error
//
// :3:9: error: value of type 'comptime_int' ignored
// :3:9: note: all non-void values must be used
// :3:9: note: to discard the value, assign it to '_'