Scalar -> vector not implicit in call or assign.

This commit is contained in:
Christoffer Lerno
2024-07-23 12:22:31 +02:00
parent 26ca8f7777
commit 379637f214
14 changed files with 159 additions and 93 deletions

View File

@@ -0,0 +1,14 @@
fn void test2(int[<2>] x) {}
fn void main()
{
int[<2>] y = 1;
y[..] = 3;
y.xy = 3; // #error: cannot use swizzling
y *= 2;
y = 3; // #error: explicit cast
test2(3); // #error: explicit cast
{|
if (y[0] == 3) return 1; // #error: explicit cast
return y;
|};
}