skia2/tests/sksl/errors/BadFieldAccess.glsl
Ethan Nicholas 87e472722f Improved error reporting ranges for swizzles
Bug: skia:13171
Change-Id: I6dffb98ac2464f930995cf8ea57e422091d20fd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/531743
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-20 20:46:51 +00:00

19 lines
672 B
GLSL

### Compilation failed:
error: 3: type 'S' does not have a field named 'missing'
void not_a_field() { S s; s.missing = 123; }
^^^^^^^^^
error: 4: not a function
void not_a_function() { S s; s.f(); }
^^^^^
error: 5: type mismatch: '=' cannot operate on 'float', 'bool3'
void not_a_bvec() { S s; s.f = bool3(true); }
^^^^^^^^^^^^^^^^^
error: 6: invalid swizzle component 'm'
void not_a_struct() { S s; s.f.missing; }
^
error: 7: expected array, but found 'float'
void not_an_array() { S s; s.f[0]; }
^^^
5 errors