1
+ vlib/v/checker/tests/overflow_int_signed_err.vv:2:2: error: value `0xff overflows `i8`
2
+ 1 | i8s := [
3
+ 2 | i8(0xff) // converted to -1
4
+ | ~~~~~~~~
5
+ 3 | i8(128) // converted to -128
6
+ 4 | i8(-129) // converted to +127
7
+ vlib/v/checker/tests/overflow_int_signed_err.vv:3:2: error: value `128 overflows `i8`
8
+ 1 | i8s := [
9
+ 2 | i8(0xff) // converted to -1
10
+ 3 | i8(128) // converted to -128
11
+ | ~~~~~~~
12
+ 4 | i8(-129) // converted to +127
13
+ 5 | i8(-0xff) // converted to +1
14
+ vlib/v/checker/tests/overflow_int_signed_err.vv:9:2: error: value `0xffff overflows `i16`
15
+ 7 |
16
+ 8 | i16s := [
17
+ 9 | i16(0xffff) // converted to -1
18
+ | ~~~~~~~~~~~
19
+ 10 | i16(32768) // converted to -32768
20
+ 11 | i16(-32769) // converted to +32767
21
+ vlib/v/checker/tests/overflow_int_signed_err.vv:10:2: error: value `32768 overflows `i16`
22
+ 8 | i16s := [
23
+ 9 | i16(0xffff) // converted to -1
24
+ 10 | i16(32768) // converted to -32768
25
+ | ~~~~~~~~~~
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`
29
+ 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
42
+ vlib/v/checker/tests/overflow_int_signed_err.vv:23:2: error: value `0xffffffffffffffff overflows `i64`
43
+ 21 |
44
+ 22 | i64s := [
45
+ 23 | i64(0xffffffffffffffff) // converted to -1
46
+ | ~~~~~~~~~~~~~~~~~~~~~~~
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
53
+ | ~~~~~~~~~~~~~~~~~~~~~~~~
54
+ 25 | i64(-9223372036854775809) // converted to +9223372036854775807
55
+ 26 | i64(-0xffffffffffffffff) // converted to +1
0 commit comments