xref: /aosp_15_r20/external/skia/resources/sksl/errors/InvalidUnary.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1struct Foo { float x; } bar;
2
3void preincrement_array()   { float    x[1]; ++x; }
4void predecrement_array()   { int3     x[2]; --x; }
5void postincrement_array()  { float4x4 x[3]; x++; }
6void postdecrement_bool()   { bool     x = true; x--; }
7void not_integer()          { int x = !12; }
8void positive_struct()      { Foo x = +bar; }
9void negative_struct()      { Foo x = -bar; }
10
11/*%%*
12'++' cannot operate on 'float[1]'
13'--' cannot operate on 'int3[2]'
14'++' cannot operate on 'float4x4[3]'
15'--' cannot operate on 'bool'
16'!' cannot operate on 'int'
17'+' cannot operate on 'Foo'
18'-' cannot operate on 'Foo'
19*%%*/
20