skia2/tests/sksl/runtime_errors/IllegalOperators.skvm
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

43 lines
1.5 KiB
Plaintext

### Compilation failed:
error: 1: operator '~' is not allowed
int bit_not(int x) { return ~x; }
^^
error: 3: operator '%' is not allowed
int remainder(int x) { return x % 2; }
^^^^^^
error: 4: operator '%=' is not allowed
int remainder_eq(int x) { return x %= 2;}
^^^^^^
error: 6: operator '<<' is not allowed
int shl (int x) { return x << 1; }
^^^^^^^
error: 7: operator '<<=' is not allowed
int shl_eq(int x) { return x <<= 1; }
^^^^^^^
error: 8: operator '>>' is not allowed
int shr (int x) { return x >> 1; }
^^^^^^^
error: 9: operator '>>=' is not allowed
int shr_eq(int x) { return x >>= 1; }
^^^^^^^
error: 11: operator '&' is not allowed
int bit_and (int x) { return x & 1; }
^^^^^^
error: 12: operator '&=' is not allowed
int bit_and_eq(int x) { return x &= 1; }
^^^^^^
error: 13: operator '|' is not allowed
int bit_or (int x) { return x | 1; }
^^^^^^
error: 14: operator '|=' is not allowed
int bit_or_eq (int x) { return x |= 1; }
^^^^^^
error: 15: operator '^' is not allowed
int bit_xor (int x) { return x ^ 1; }
^^^^^^
error: 16: operator '^=' is not allowed
int bit_xor_eq(int x) { return x ^= 1; }
^^^^^^
13 errors