aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/optional_empty_error_set.zig
blob: 54b5b6510b0ef92c5247cef69c5024f970341a6a (plain)
1
2
3
4
5
6
7
8
9
10
11
export fn example() void {
    comptime foo() catch |err| switch (err) {};
}
var x: ?error{} = null;
fn foo() !void {
    return x.?;
}
// error
//
// :6:13: error: unable to unwrap null
// :2:17: note: called at comptime here