skia2/tests/sksl/errors/ArrayOfInvalidSize.glsl
John Stiles 5c905c94f0 Refuse to coerce integer values that don't fit into their type.
Previously, we would create SkSL literals of ints that didn't fit into
an int. This change causes a few errors to report differently. (In
particular, we no longer create global variables containing values that
wouldn't fit in that variable, so those symbols are invalid later.)

Change-Id: I29d219e853126ea78dd2d2a6d8a69b23ef2b06b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/464121
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-10-27 17:54:05 +00:00

22 lines
768 B
GLSL

### Compilation failed:
error: 1: array size must be positive
error: 2: array size must be positive
error: 3: array size must be positive
error: 4: expected 'int', but found 'float'
error: 5: integer is out of range for type 'int': 4000000000
error: 6: expected 'int', but found 'bool'
error: 7: expected 'int', but found 'bool'
error: 8: expected 'int', but found 'int2'
error: 9: missing index in '[]'
error: 10: array size must be positive
error: 11: array size must be positive
error: 12: array size must be positive
error: 13: array size must be an integer
error: 14: array size out of bounds
error: 15: array size must be an integer
error: 16: array size must be an integer
error: 17: array size must be an integer
error: 18: expected array dimension
18 errors