Issue #26: Detect empty array constructors, require at least on operand.
This commit is contained in:
@@ -100,3 +100,5 @@ void foo3()
|
||||
resize2.length();
|
||||
resize2[5] = 4.0; // ERROR
|
||||
}
|
||||
|
||||
int[] i = int[](); // ERROR, need constructor arguments
|
||||
|
||||
@@ -22,7 +22,9 @@ ERROR: 0:79: '' : array size required
|
||||
ERROR: 0:84: 'return' : type does not match, or is not convertible to, the function's return type
|
||||
ERROR: 0:93: 'length' : array must be declared with a size before using this method
|
||||
ERROR: 0:101: '[' : array index out of range '5'
|
||||
ERROR: 23 compilation errors. No code generated.
|
||||
ERROR: 0:104: 'constructor' : array constructor must have at least one argument
|
||||
ERROR: 0:104: '=' : cannot convert from 'const float' to 'global implicitly-sized array of int'
|
||||
ERROR: 25 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 130
|
||||
@@ -264,6 +266,7 @@ ERROR: node is still EOpNull!
|
||||
0:? 'guns' (global implicitly-sized array of 3-component vector of float)
|
||||
0:? 'f' (global float)
|
||||
0:? 'gUnusedUnsized' (global implicitly-sized array of float)
|
||||
0:? 'i' (global implicitly-sized array of int)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -508,4 +511,5 @@ ERROR: node is still EOpNull!
|
||||
0:? 'guns' (global 8-element array of 3-component vector of float)
|
||||
0:? 'f' (global float)
|
||||
0:? 'gUnusedUnsized' (global 1-element array of float)
|
||||
0:? 'i' (global 1-element array of int)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user