mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
- Adding the incorrect sized vector to a pointer vector would cause a crash.
This commit is contained in:
8
test/test_suite/vector/vector_pointer_not_same_size.c3
Normal file
8
test/test_suite/vector/vector_pointer_not_same_size.c3
Normal file
@@ -0,0 +1,8 @@
|
||||
int a;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
void*[<2>] x = { &a, &a };
|
||||
int[<1>] y = { 1 };
|
||||
x + y; // #error: It is not possible to cast 'int[<1>]' to 'isz[<2>]' (long[<2>])
|
||||
}
|
||||
Reference in New Issue
Block a user