skia2/tests/sksl/runtime_errors/IllegalArrayOps.skvm
Brian Osman 6e2dccb979 Runtime Effects: Disallow all operators on arrays or arrays-in-structs
None of these are legal in GLSL ES 1.0. Added a new test that previously
compiled without error. Started out with just assignment and equality,
then realized that sequence and ternary should be blocked, too.

Bug: skia:11323
Change-Id: I02691f819565afabeadbb12cab6c07acf40093f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370880
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-17 18:05:04 +00:00

21 lines
1.4 KiB
Plaintext

### Compilation failed:
error: 16: operator '=' can not operate on arrays (or structs containing arrays)
error: 17: operator '=' can not operate on arrays (or structs containing arrays)
error: 18: operator '=' can not operate on arrays (or structs containing arrays)
error: 21: functions may not return structs containing arrays
error: 22: functions may not return structs containing arrays
error: 24: operator '==' can not operate on arrays (or structs containing arrays)
error: 25: operator '==' can not operate on arrays (or structs containing arrays)
error: 26: operator '==' can not operate on arrays (or structs containing arrays)
error: 28: operator '!=' can not operate on arrays (or structs containing arrays)
error: 29: operator '!=' can not operate on arrays (or structs containing arrays)
error: 30: operator '!=' can not operate on arrays (or structs containing arrays)
error: 32: operator ',' can not operate on arrays (or structs containing arrays)
error: 33: operator ',' can not operate on arrays (or structs containing arrays)
error: 34: operator ',' can not operate on arrays (or structs containing arrays)
error: 36: ternary operator result may not be an array (or struct containing an array)
error: 37: ternary operator result may not be an array (or struct containing an array)
error: 38: ternary operator result may not be an array (or struct containing an array)
17 errors