xref: /aosp_15_r20/external/skia/resources/sksl/errors/BinaryInvalidType.rts (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1void functionLeft() {
2    float x = functionLeft * 2;
3}
4
5void functionRight() {
6    float x = 2 * functionRight;
7}
8
9void functionBoth() {
10    float x = functionBoth * functionBoth;
11}
12
13struct S {
14    float x;
15} s;
16
17void structLeft() {
18    float x = s * 2;
19}
20
21void structRight() {
22    float x = 2 * s;
23}
24
25void structBoth() {
26    float x = s * s;
27}
28
29uniform shader shad;
30
31void shaderLeft() {
32    float x = shad * 2;
33}
34
35void shaderRight() {
36    float x = 2 * shad;
37}
38
39void shaderBoth() {
40    float x = shad * shad;
41}
42
43int array[1];
44
45void arrayLeft() {
46    float x = array * 2;
47}
48
49void arrayRight() {
50    float x = 2 * array;
51}
52
53void arrayBoth() {
54    float x = array * array;
55}
56
57/*%%*
58type mismatch: '*' cannot operate on '<INVALID>', 'int'
59type mismatch: '*' cannot operate on 'int', '<INVALID>'
60type mismatch: '*' cannot operate on '<INVALID>', '<INVALID>'
61type mismatch: '*' cannot operate on 'S', 'int'
62type mismatch: '*' cannot operate on 'int', 'S'
63type mismatch: '*' cannot operate on 'S', 'S'
64type mismatch: '*' cannot operate on 'shader', 'int'
65type mismatch: '*' cannot operate on 'int', 'shader'
66type mismatch: '*' cannot operate on 'shader', 'shader'
67type mismatch: '*' cannot operate on 'int[1]', 'int'
68type mismatch: '*' cannot operate on 'int', 'int[1]'
69type mismatch: '*' cannot operate on 'int[1]', 'int[1]'
70*%%*/
71