| 1 | const X = struct { |
| 2 | fn init() !X { |
| 3 | return error.a; |
| 4 | } |
| 5 | |
| 6 | fn a(x: X) void { |
| 7 | _ = x; |
| 8 | } |
| 9 | }; |
| 10 | |
| 11 | export fn entry() void { |
| 12 | const x = X.init(); |
| 13 | x.a(); |
| 14 | } |
| 15 | |
| 16 | // error |
| 17 | // |
| 18 | // :13:6: error: no field or member function named 'a' in '@typeInfo(@typeInfo(@TypeOf(tmp.X.init)).@"fn".return_type.?).error_union.error_set!tmp.X' |
| 19 | // :13:6: note: consider using 'try', 'catch', or 'if' |