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

55 lines
2.5 KiB
Plaintext

### Compilation failed:
error: 16: operator '=' can not operate on arrays (or structs containing arrays)
void assign_A() { a1 = a2; }
^^^^^^^
error: 17: operator '=' can not operate on arrays (or structs containing arrays)
void assign_S() { s1 = s2; }
^^^^^^^
error: 18: operator '=' can not operate on arrays (or structs containing arrays)
void assign_T() { t1 = t2; }
^^^^^^^
error: 21: functions may not return structs containing arrays
S return_S() { return s1; }
^^^^^^^^^^^^
error: 22: functions may not return structs containing arrays
T return_T() { return t1; }
^^^^^^^^^^^^
error: 24: operator '==' can not operate on arrays (or structs containing arrays)
bool equals_A() { return a1 == a2; }
^^^^^^^^
error: 25: operator '==' can not operate on arrays (or structs containing arrays)
bool equals_S() { return s1 == s2; }
^^^^^^^^
error: 26: operator '==' can not operate on arrays (or structs containing arrays)
bool equals_T() { return t1 == t2; }
^^^^^^^^
error: 28: operator '!=' can not operate on arrays (or structs containing arrays)
bool notequals_A() { return a1 != a2; }
^^^^^^^^
error: 29: operator '!=' can not operate on arrays (or structs containing arrays)
bool notequals_S() { return s1 != s2; }
^^^^^^^^
error: 30: operator '!=' can not operate on arrays (or structs containing arrays)
bool notequals_T() { return t1 != t2; }
^^^^^^^^
error: 32: operator ',' can not operate on arrays (or structs containing arrays)
void sequence_A() { a1, a2; }
^^^^^^
error: 33: operator ',' can not operate on arrays (or structs containing arrays)
void sequence_S() { s1, s2; }
^^^^^^
error: 34: operator ',' can not operate on arrays (or structs containing arrays)
void sequence_T() { t1, t2; }
^^^^^^
error: 36: ternary operator result may not be an array (or struct containing an array)
int ternary_A(bool b) { return (b ? a1 : a2) [0]; }
^^^^^^^^^^^
error: 37: ternary operator result may not be an array (or struct containing an array)
int ternary_S(bool b) { return (b ? s1 : s2) .x[0]; }
^^^^^^^^^^^
error: 38: ternary operator result may not be an array (or struct containing an array)
int ternary_T(bool b) { return (b ? t1 : t2).s.x[0]; }
^^^^^^^^^^^
17 errors