skia2/tests/sksl/errors/InvalidUnary.glsl
Ethan Nicholas cb13c892af Added range highlighting to SkSL error reports
SkSL errors now identify the specific range of code they are describing,
rather than just the line number.

Change-Id: Ifabb3148476f9b4cd8e532f23e5b38e1cf33a87e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528039
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-04-07 13:29:48 +00:00

25 lines
1.0 KiB
GLSL

### Compilation failed:
error: 3: '++' cannot operate on 'float4x4'
void preincrement_matrix() { float4x4 x = float4x4(1); ++x; }
^^^
error: 4: '--' cannot operate on 'float3'
void predecrement_vector() { float3 x = float3(1); --x; }
^^^
error: 5: '++' cannot operate on 'float4x4'
void postincrement_matrix() { float4x4 x = float4x4(1); x++; }
^^^
error: 6: '--' cannot operate on 'float3'
void postdecrement_vector() { float3 x = float3(1); x--; }
^^^
error: 7: '!' cannot operate on 'int'
void not_integer() { int x = !12; }
^^^
error: 8: '+' cannot operate on 'Foo'
void positive_struct() { Foo x = +bar; }
^^^^
error: 9: '-' cannot operate on 'Foo'
void negative_struct() { Foo x = -bar; }
^^^^
7 errors