diff options
Diffstat (limited to 'resources/sksl/errors/ArrayIndexOutOfRange.rts')
-rw-r--r-- | resources/sksl/errors/ArrayIndexOutOfRange.rts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/resources/sksl/errors/ArrayIndexOutOfRange.rts b/resources/sksl/errors/ArrayIndexOutOfRange.rts new file mode 100644 index 0000000000..610e6e6a88 --- /dev/null +++ b/resources/sksl/errors/ArrayIndexOutOfRange.rts @@ -0,0 +1,15 @@ +void array_neg1 () { int a[123]; int v = a[-1]; } +void array_0 () { float a[123]; float v = a[0]; } +void array_122 () { bool2 a[123]; bool2 v = a[122]; } +void array_123 () { half4x4 a[123]; half4x4 v = a[123]; } +void array_huge () { int4 a[123]; int4 v = a[1000000000]; } +void array_overflow () { half3 a[123]; half3 v = a[3000000000]; } +void array_no_index () { int a[123]; int v = a[]; } + +/*%%* +index -1 out of range for 'int[123]' +index 123 out of range for 'half4x4[123]' +index 1000000000 out of range for 'int4[123]' +index 3000000000 out of range for 'half3[123]' +missing index in '[]' +*%%*/ |