blob: d8df149d188bd689e13e9625255e9ac2817f7bb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
const V = @Vector(8, u8);
const A = [8]u8;
comptime {
var v: V = V{1};
_ = v;
}
comptime {
var v: V = V{};
_ = v;
}
comptime {
var a: A = A{1};
_ = a;
}
comptime {
var a: A = A{};
_ = a;
}
// error
// backend=stage2
// target=native
//
// :4:17: error: expected 8 vector elements; found 1
// :8:17: error: expected 8 vector elements; found 0
// :12:17: error: expected 8 array elements; found 1
// :16:17: error: expected 8 array elements; found 0
|