aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/astgen_sema_errors_combined.zig
blob: 963cca6b7e248de2c0a3a5541d16fbeb5fbc5b7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const a = bogus; // astgen error (undeclared identifier)
const b: u32 = "hi"; // sema error (type mismatch)

comptime {
    _ = b;
    @compileError("not hit because 'b' failed");
}

comptime {
    @compileError("this should be hit");
}

// error
//
// :1:11: error: use of undeclared identifier 'bogus'
// :2:16: error: expected type 'u32', found '*const [2:0]u8'
// :10:5: error: this should be hit