xref: /aosp_15_r20/external/skia/resources/sksl/errors/BooleanArithmetic.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1bool2 add_boolean()    { return false + true; }
2bool2 sub_boolean()    { return false - true; }
3bool2 mul_boolean()    { return false * true; }
4bool2 div_boolean()    { return false / true; }
5bool2 mod_boolean()    { return false % true; }
6bool2 shl_boolean()    { return false << true; }
7bool2 shr_boolean()    { return false >> true; }
8bool2 neg_boolean()    { return -false; }
9bool2 bitnot_boolean() { return ~false; }
10bool2 bitand_boolean() { return false & true; }
11bool2 bitor_boolean()  { return false | true; }
12bool2 bitxor_boolean() { return false ^ true; }
13
14bool2 add_boolean_vec()    { return bool2(false, false) + bool2(true, true); }
15bool2 sub_boolean_vec()    { return bool2(false, false) - bool2(true, true); }
16bool2 mul_boolean_vec()    { return bool2(false, false) * bool2(true, true); }
17bool2 div_boolean_vec()    { return bool2(false, false) / bool2(true, true); }
18bool2 mod_boolean_vec()    { return bool2(false, false) % bool2(true, true); }
19bool2 shl_boolean_vec()    { return bool2(false, false) << bool2(true, true); }
20bool2 shr_boolean_vec()    { return bool2(false, false) >> bool2(true, true); }
21bool2 not_boolean_vec()    { return !bool2(false, false); }
22bool2 neg_boolean_vec()    { return -bool2(false, false); }
23bool2 bitnot_boolean_vec() { return ~bool2(false, false); }
24bool2 bitand_boolean_vec() { return bool2(false, false) & bool2(true, true); }
25bool2 bitor_boolean_vec()  { return bool2(false, false) | bool2(true, true); }
26bool2 bitxor_boolean_vec() { return bool2(false, false) ^ bool2(true, true); }
27
28/*%%*
29type mismatch: '+' cannot operate on 'bool', 'bool'
30type mismatch: '-' cannot operate on 'bool', 'bool'
31type mismatch: '*' cannot operate on 'bool', 'bool'
32type mismatch: '/' cannot operate on 'bool', 'bool'
33type mismatch: '%' cannot operate on 'bool', 'bool'
34type mismatch: '<<' cannot operate on 'bool', 'bool'
35type mismatch: '>>' cannot operate on 'bool', 'bool'
36'-' cannot operate on 'bool'
37'~' cannot operate on 'bool'
38type mismatch: '&' cannot operate on 'bool', 'bool'
39type mismatch: '|' cannot operate on 'bool', 'bool'
40type mismatch: '^' cannot operate on 'bool', 'bool'
41type mismatch: '+' cannot operate on 'bool2', 'bool2'
42type mismatch: '-' cannot operate on 'bool2', 'bool2'
43type mismatch: '*' cannot operate on 'bool2', 'bool2'
44type mismatch: '/' cannot operate on 'bool2', 'bool2'
45type mismatch: '%' cannot operate on 'bool2', 'bool2'
46type mismatch: '<<' cannot operate on 'bool2', 'bool2'
47type mismatch: '>>' cannot operate on 'bool2', 'bool2'
48'!' cannot operate on 'bool2'
49'-' cannot operate on 'bool2'
50'~' cannot operate on 'bool2'
51type mismatch: '&' cannot operate on 'bool2', 'bool2'
52type mismatch: '|' cannot operate on 'bool2', 'bool2'
53type mismatch: '^' cannot operate on 'bool2', 'bool2'
54*%%*/
55