master
 1export fn a() void {
 2    errdefer |_| {
 3        @"_";
 4    }
 5}
 6export fn b() void {
 7    const x: error{}!void = {};
 8    x catch |_| {
 9        @"_";
10    };
11}
12export fn c() void {
13    const x: error{}!void = {};
14    x catch |_| switch (_) {};
15}
16export fn d() void {
17    const x: error{}!u32 = 0;
18    if (x) |v| v else |_| switch (_) {}
19}
20
21// error
22//
23// :2:15: error: discard of error capture; omit it instead
24// :3:9: error: use of undeclared identifier '_'
25// :8:14: error: discard of error capture; omit it instead
26// :9:9: error: use of undeclared identifier '_'
27// :14:14: error: discard of error capture; omit it instead
28// :18:24: error: discard of error capture; omit it instead