| ... | @@ -361,7 +361,8 @@ test "nested catch" { | ... | @@ -361,7 +361,8 @@ test "nested catch" { |
| 361 | test "implicit cast to optional to error union to return result loc" { | 361 | test "implicit cast to optional to error union to return result loc" { |
| 362 | const S = struct { | 362 | const S = struct { |
| 363 | fn entry() void { | 363 | fn entry() void { |
| 364 | if (func(undefined)) |opt| { | 364 | var x: Foo = undefined; |
| | 365 | if (func(&x)) |opt| { |
| 365 | expect(opt != null); | 366 | expect(opt != null); |
| 366 | } else |_| @panic("expected non error"); | 367 | } else |_| @panic("expected non error"); |
| 367 | } | 368 | } |