aboutsummaryrefslogtreecommitdiff
path: root/resources/sksl/errors/BinaryTypeMismatch.sksl
blob: 4a3eb55253661a3d90fd8935445802069d9a1fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void int_times_bool()   { float x = 3 * true; }
void int_or_float()     { bool x = 1 || 2.0; }
void float2_eq_int()    { bool x = float2(0) == 0; }
void float2_neq_int()   { bool x = float2(0) != 0; }

void float2_lt_float2() { bool x = float2(0) < float2(1); }
void float2_lt_float()  { bool x = float2(0) < 0.0; }
void float_lt_float2()  { bool x = 0.0 < float2(0); }

/*%%*
type mismatch: '*' cannot operate on 'int', 'bool'
type mismatch: '||' cannot operate on 'int', 'float'
type mismatch: '==' cannot operate on 'float2', 'int'
type mismatch: '!=' cannot operate on 'float2', 'int'
type mismatch: '<' cannot operate on 'float2', 'float2'
type mismatch: '<' cannot operate on 'float2', 'float'
type mismatch: '<' cannot operate on 'float', 'float2'
*%%*/