1
1
vlib/v/checker/tests/overflow_int_signed_err.vv:2:2: error: value `0xff overflows `i8`
2
2
1 | i8s := [
3
- 2 | i8(0xff) // converted to -1
3
+ 2 | i8(0xff), // converted to -1
4
4
| ~~~~~~~~
5
- 3 | i8(128) // converted to -128
6
- 4 | i8(-129) // converted to +127
5
+ 3 | i8(128), // converted to -128
6
+ 4 | i8(-129), // converted to +127
7
7
vlib/v/checker/tests/overflow_int_signed_err.vv:3:2: error: value `128 overflows `i8`
8
8
1 | i8s := [
9
- 2 | i8(0xff) // converted to -1
10
- 3 | i8(128) // converted to -128
9
+ 2 | i8(0xff), // converted to -1
10
+ 3 | i8(128), // converted to -128
11
11
| ~~~~~~~
12
- 4 | i8(-129) // converted to +127
13
- 5 | i8(-0xff) // converted to +1
12
+ 4 | i8(-129), // converted to +127
13
+ 5 | i8(-0xff), // converted to +1
14
+ vlib/v/checker/tests/overflow_int_signed_err.vv:4:2: error: value `-129 overflows `i8`
15
+ 2 | i8(0xff), // converted to -1
16
+ 3 | i8(128), // converted to -128
17
+ 4 | i8(-129), // converted to +127
18
+ | ~~~~~~~~
19
+ 5 | i8(-0xff), // converted to +1
20
+ 6 | ]
21
+ vlib/v/checker/tests/overflow_int_signed_err.vv:5:2: error: value `-0xff overflows `i8`
22
+ 3 | i8(128), // converted to -128
23
+ 4 | i8(-129), // converted to +127
24
+ 5 | i8(-0xff), // converted to +1
25
+ | ~~~~~~~~~
26
+ 6 | ]
27
+ 7 |
14
28
vlib/v/checker/tests/overflow_int_signed_err.vv:9:2: error: value `0xffff overflows `i16`
15
29
7 |
16
30
8 | i16s := [
17
- 9 | i16(0xffff) // converted to -1
31
+ 9 | i16(0xffff), // converted to -1
18
32
| ~~~~~~~~~~~
19
- 10 | i16(32768) // converted to -32768
20
- 11 | i16(-32769) // converted to +32767
33
+ 10 | i16(32768), // converted to -32768
34
+ 11 | i16(-32769), // converted to +32767
21
35
vlib/v/checker/tests/overflow_int_signed_err.vv:10:2: error: value `32768 overflows `i16`
22
36
8 | i16s := [
23
- 9 | i16(0xffff) // converted to -1
24
- 10 | i16(32768) // converted to -32768
37
+ 9 | i16(0xffff), // converted to -1
38
+ 10 | i16(32768), // converted to -32768
25
39
| ~~~~~~~~~~
26
- 11 | i16(-32769) // converted to +32767
27
- 12 | i16(-0xffff) // converted to +1
28
- vlib/v/checker/tests/overflow_int_signed_err.vv:16:2: error: value `0xffffffff overflows `int`
40
+ 11 | i16(-32769), // converted to +32767
41
+ 12 | i16(-0xffff), // converted to +1
42
+ vlib/v/checker/tests/overflow_int_signed_err.vv:11:2: error: value `-32769 overflows `i16`
43
+ 9 | i16(0xffff), // converted to -1
44
+ 10 | i16(32768), // converted to -32768
45
+ 11 | i16(-32769), // converted to +32767
46
+ | ~~~~~~~~~~~
47
+ 12 | i16(-0xffff), // converted to +1
48
+ 13 | ]
49
+ vlib/v/checker/tests/overflow_int_signed_err.vv:12:2: error: value `-0xffff overflows `i16`
50
+ 10 | i16(32768), // converted to -32768
51
+ 11 | i16(-32769), // converted to +32767
52
+ 12 | i16(-0xffff), // converted to +1
53
+ | ~~~~~~~~~~~~
54
+ 13 | ]
29
55
14 |
30
- 15 | ints := [
31
- 16 | int(0xffffffff) // converted to -1
32
- | ~~~~~~~~~~~~~~~
33
- 17 | int(2147483648) // converted to -2147483648
34
- 18 | int(-2147483649) // converted to +2147483647
35
- vlib/v/checker/tests/overflow_int_signed_err.vv:17:2: error: value `2147483648 overflows `int`
36
- 15 | ints := [
37
- 16 | int(0xffffffff) // converted to -1
38
- 17 | int(2147483648) // converted to -2147483648
39
- | ~~~~~~~~~~~~~~~
40
- 18 | int(-2147483649) // converted to +2147483647
41
- 19 | int(-0xffffffff) // converted to +1
56
+ vlib/v/checker/tests/overflow_int_signed_err.vv:18:2: error: value `-2147483649 overflows `int`
57
+ 16 | int(0xffffffff), // converted to -1
58
+ 17 | int(2147483648), // converted to -2147483648
59
+ 18 | int(-2147483649), // converted to +2147483647
60
+ | ~~~~~~~~~~~~~~~~
61
+ 19 | int(-0xffffffff), // converted to +1
62
+ 20 | ]
42
63
vlib/v/checker/tests/overflow_int_signed_err.vv:23:2: error: value `0xffffffffffffffff overflows `i64`
43
64
21 |
44
65
22 | i64s := [
45
- 23 | i64(0xffffffffffffffff) // converted to -1
66
+ 23 | i64(0xffffffffffffffff), // converted to -1
46
67
| ~~~~~~~~~~~~~~~~~~~~~~~
47
- 24 | i64(9223372036854775808) // converted to -9223372036854775808
48
- 25 | i64(-9223372036854775809) // converted to +9223372036854775807
49
- vlib/v/checker/tests/overflow_int_signed_err.vv:24 :2: error: value `9223372036854775808 overflows `i64`
50
- 22 | i64s := [
51
- 23 | i64(0xffffffffffffffff) // converted to -1
52
- 24 | i64(9223372036854775808) // converted to -9223372036854775808
68
+ 24 | i64(9223372036854775808), // converted to -9223372036854775808
69
+ 25 | i64(-9223372036854775809), // converted to +9223372036854775807
70
+ vlib/v/checker/tests/overflow_int_signed_err.vv:26 :2: error: value `-0xffffffffffffffff overflows `i64`
71
+ 24 | i64(9223372036854775808), // converted to -9223372036854775808
72
+ 25 | i64(-9223372036854775809), // converted to +9223372036854775807
73
+ 26 | i64(-0xffffffffffffffff), // converted to +1
53
74
| ~~~~~~~~~~~~~~~~~~~~~~~~
54
- 25 | i64(-9223372036854775809) // converted to +9223372036854775807
55
- 26 | i64(-0xffffffffffffffff) // converted to +1
75
+ 27 | ]
76
+ 28 |
0 commit comments