| 1 | export fn foo() void { |
| 2 | const x, const y = .{ 1, 2, 3 }; |
| 3 | _ = .{ x, y }; |
| 4 | } |
| 5 | |
| 6 | export fn bar() void { |
| 7 | var x: u32 = undefined; |
| 8 | x, const y: u64 = blk: { |
| 9 | if (true) break :blk .{ 1, 2 }; |
| 10 | break :blk .{ .x = 123, .y = 456 }; |
| 11 | }; |
| 12 | _ = y; |
| 13 | } |
| 14 | |
| 15 | // error |
| 16 | // |
| 17 | // :2:25: error: expected 2 elements for destructure, found 3 |
| 18 | // :2:22: note: result destructured here |
| 19 | // :10:21: error: struct value cannot be destructured |
| 20 | // :8:21: note: result destructured here |