aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/cast_unreachable.zig
blob: 39da655d7fe1eda48825a424ed7c95c4742d8a1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn f() i32 {
    return @as(i32, return 1);
}
export fn entry() void {
    _ = f();
}

// error
// backend=stage2
// target=native
//
// :2:12: error: unreachable code
// :2:21: note: control flow is diverted here
// :2:5: error: unreachable code
// :2:12: note: control flow is diverted here