aboutsummaryrefslogtreecommitdiff
path: root/resources/sksl/errors/BitShiftFloatVector.sksl
blob: bac8a76168f7fa877e1bb23376f4dfbd66f417f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Expect 10 errors (one per function)

float2 x;

void shr_eq() { x >>= 1; }
void shl_eq() { x <<= 1; }
void and_eq() { x &=  1; }
void or_eq()  { x |=  1; }
void xor_eq() { x ^=  1; }

void shr() { x = x >> 1; }
void shl() { x = x << 1; }
void and() { x = x & 1; }
void or()  { x = x | 1; }
void xor() { x = x ^ 1; }

/*%%*
type mismatch: '>>=' cannot operate on 'float2', 'int'
type mismatch: '<<=' cannot operate on 'float2', 'int'
type mismatch: '&=' cannot operate on 'float2', 'int'
type mismatch: '|=' cannot operate on 'float2', 'int'
type mismatch: '^=' cannot operate on 'float2', 'int'
type mismatch: '>>' cannot operate on 'float2', 'int'
type mismatch: '<<' cannot operate on 'float2', 'int'
type mismatch: '&' cannot operate on 'float2', 'int'
type mismatch: '|' cannot operate on 'float2', 'int'
type mismatch: '^' cannot operate on 'float2', 'int'
*%%*/