zig/test/cases/compile_errors/cast_unreachable.zig
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00

15 lines
293 B
Zig

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