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