aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/catch_on_undefined_value.zig
blob: 0fb11fc05f942565c294ba0587fe125faeb840c6 (plain)
1
2
3
4
5
6
7
8
9
10
comptime {
    const a: anyerror!bool = undefined;
    if (a catch false) {}
}

// error
// backend=stage2
// target=native
//
// :3:11: error: use of undefined value here causes undefined behavior