Improve error checking for unsized arrays.
Added support for resolving dimensions of multi-dimensional unsized arrays from their initializer exprerssions (previously, only the first dimension would be resolved.) Added checks to make sure that no unsized array dimensions remain after doing this (except for the first dimensision of array parameters to functions.)
This commit is contained in:
3
tests_errors/initexpr-2.ispc
Normal file
3
tests_errors/initexpr-2.ispc
Normal file
@@ -0,0 +1,3 @@
|
||||
// Initializer list for array "int32[2][4]" must have 2 elements (has 3).
|
||||
|
||||
int a[2][4] = { { 1, 2, 3 }, { 1, 2, 3, 4 }, 1 };
|
||||
Reference in New Issue
Block a user