v4 / vlib / v / checker / tests / cast_string_to_int_err.out
61 lines · 61 sloc · 2.39 KB · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1vlib/v/checker/tests/cast_string_to_int_err.vv:2:7: error: cannot cast string to `int`, use `'456'.int()` instead.
2 1 | fn main() {
3 2 | _ := int('456')
4 | ~~~~~~~~~~
5 3 | _ := i8('11')
6 4 | _ := i16('111')
7vlib/v/checker/tests/cast_string_to_int_err.vv:3:7: error: cannot cast string to `i8`, use `'11'.i8()` instead.
8 1 | fn main() {
9 2 | _ := int('456')
10 3 | _ := i8('11')
11 | ~~~~~~~~
12 4 | _ := i16('111')
13 5 | _ := i64('234')
14vlib/v/checker/tests/cast_string_to_int_err.vv:4:7: error: cannot cast string to `i16`, use `'111'.i16()` instead.
15 2 | _ := int('456')
16 3 | _ := i8('11')
17 4 | _ := i16('111')
18 | ~~~~~~~~~~
19 5 | _ := i64('234')
20 6 | _ := f32('2.22')
21vlib/v/checker/tests/cast_string_to_int_err.vv:5:7: error: cannot cast string to `i64`, use `'234'.i64()` instead.
22 3 | _ := i8('11')
23 4 | _ := i16('111')
24 5 | _ := i64('234')
25 | ~~~~~~~~~~
26 6 | _ := f32('2.22')
27 7 | _ := f64('2.33333')
28vlib/v/checker/tests/cast_string_to_int_err.vv:6:7: error: cannot cast string to `f32`, use `'2.22'.f32()` instead.
29 4 | _ := i16('111')
30 5 | _ := i64('234')
31 6 | _ := f32('2.22')
32 | ~~~~~~~~~~~
33 7 | _ := f64('2.33333')
34 8 | _ := u16('234')
35vlib/v/checker/tests/cast_string_to_int_err.vv:7:7: error: cannot cast string to `f64`, use `'2.33333'.f64()` instead.
36 5 | _ := i64('234')
37 6 | _ := f32('2.22')
38 7 | _ := f64('2.33333')
39 | ~~~~~~~~~~~~~~
40 8 | _ := u16('234')
41 9 | _ := u32('2')
42vlib/v/checker/tests/cast_string_to_int_err.vv:8:7: error: cannot cast string to `u16`, use `'234'.u16()` instead.
43 6 | _ := f32('2.22')
44 7 | _ := f64('2.33333')
45 8 | _ := u16('234')
46 | ~~~~~~~~~~
47 9 | _ := u32('2')
48 10 | _ := u64('22')
49vlib/v/checker/tests/cast_string_to_int_err.vv:9:7: error: cannot cast string to `u32`, use `'2'.u32()` instead.
50 7 | _ := f64('2.33333')
51 8 | _ := u16('234')
52 9 | _ := u32('2')
53 | ~~~~~~~~
54 10 | _ := u64('22')
55 11 | }
56vlib/v/checker/tests/cast_string_to_int_err.vv:10:7: error: cannot cast string to `u64`, use `'22'.u64()` instead.
57 8 | _ := u16('234')
58 9 | _ := u32('2')
59 10 | _ := u64('22')
60 | ~~~~~~~~~
61 11 | }
62