Fix dues to crash when converting a const vector to another vector #1864.

This commit is contained in:
Christoffer Lerno
2025-01-20 16:26:26 +01:00
parent 5183370773
commit ad3cd88350
4 changed files with 17 additions and 2 deletions

View File

@@ -9,5 +9,5 @@ fn void main()
int[<*>] z = x;
int[<*>] w = y;
double[<2>] ww = x;
short[<2>] www = y; // #error: implicitly be converted
short[<2>] www = y; // #error: Implicitly casting 'int[2]' to 'short[<2>]'
}

View File

@@ -0,0 +1,5 @@
fn int main(String[] args)
{
const double[4] ONE = { 1.0, 1.0, 1.0, 1.0 };
float[<4>] vec4 = ONE; // #error: Implicitly casting 'double[4]' to 'float[<4>]'
}