aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/invalid_destructure_error_union.zig
blob: d5a03443a8272f7e34296475fcc4480d47c964c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
pub export fn entry() void {
    const foo: anyerror!u32 = error.Failure;
    const bar, const baz = foo;
    _ = bar;
    _ = baz;
}

// error
//
// :3:28: error: type 'anyerror!u32' cannot be destructured
// :3:26: note: result destructured here