| 1 | const V = @Vector(8, u8); |
| 2 | const A = [8]u8; |
| 3 | comptime { |
| 4 | var v: V = V{1}; |
| 5 | _ = &v; |
| 6 | } |
| 7 | comptime { |
| 8 | var v: V = V{}; |
| 9 | _ = &v; |
| 10 | } |
| 11 | comptime { |
| 12 | var a: A = A{1}; |
| 13 | _ = &a; |
| 14 | } |
| 15 | comptime { |
| 16 | var a: A = A{}; |
| 17 | _ = &a; |
| 18 | } |
| 19 | pub export fn entry1() void { |
| 20 | var bla: V = .{ 1, 2, 3, 4 }; |
| 21 | _ = &bla; |
| 22 | } |
| 23 | pub export fn entry2() void { |
| 24 | var bla: A = .{ 1, 2, 3, 4 }; |
| 25 | _ = &bla; |
| 26 | } |
| 27 | const S = struct { |
| 28 | list: [2]u8 = .{0}, |
| 29 | }; |
| 30 | export fn entry3() void { |
| 31 | _ = S{}; |
| 32 | } |
| 33 | |
| 34 | // error |
| 35 | // |
| 36 | // :4:17: error: expected 8 vector elements; found 1 |
| 37 | // :8:17: error: expected 8 vector elements; found 0 |
| 38 | // :12:17: error: expected 8 array elements; found 1 |
| 39 | // :16:17: error: expected 8 array elements; found 0 |
| 40 | // :20:19: error: expected 8 vector elements; found 4 |
| 41 | // :24:19: error: expected 8 array elements; found 4 |
| 42 | // :28:20: error: expected 2 array elements; found 1 |