aboutsummaryrefslogtreecommitdiff
path: root/resources/sksl/errors/OverflowIntLiteral.sksl
blob: ba27e6056b67281419b7403edf0b7072a9deb12f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Expect 6 errors

const int intMin         = -2147483648;
const int intMinMinusOne = -2147483649;                 // error
const int intMax         = 2147483647;
const int intMaxPlusOne  = 2147483648;                  // error

short4 s4_neg = short4(-32766, -32767, -32769, -32768); // error -32769
short4 s4_pos = short4(32765, 32768, 32766, 32767);     // error 32768

int   cast_int   = int(2147483648.);                    // error
short cast_short = short(32768.);                       // error

/*%%*
integer is out of range for type 'int': -2147483649
integer is out of range for type 'int': 2147483648
integer is out of range for type 'short': -32769
integer is out of range for type 'short': 32768
integer is out of range for type 'int': 2147483648
integer is out of range for type 'short': 32768
*%%*/