mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix dues to crash when converting a const vector to another vector #1864.
This commit is contained in:
@@ -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>]'
|
||||
}
|
||||
5
test/test_suite/vector/vector_to_vector_const_fail.c3
Normal file
5
test/test_suite/vector/vector_to_vector_const_fail.c3
Normal 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>]'
|
||||
}
|
||||
Reference in New Issue
Block a user