blob: 9fe4c10bde0b3848fd1a77c9a7853e93ead3f5dc (
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
|
vlib/v/checker/tests/cannot_cast_to_struct.vv:10:7: error: casting to struct is deprecated, use e.g. `Struct{...expr}` instead
8 |
9 | fn main() {
10 | _ := Test(Abc{})
| ~~~~~~~~~~~
11 | sum := Alphabet(Xyz{})
12 | _ = Xyz(sum)
vlib/v/checker/tests/cannot_cast_to_struct.vv:12:6: error: cannot cast `Alphabet` to struct
10 | _ := Test(Abc{})
11 | sum := Alphabet(Xyz{})
12 | _ = Xyz(sum)
| ~~~~~~~~
13 | _ = Xyz(5)
14 | s := Abc{}
vlib/v/checker/tests/cannot_cast_to_struct.vv:13:6: error: cannot cast `int literal` to struct
11 | sum := Alphabet(Xyz{})
12 | _ = Xyz(sum)
13 | _ = Xyz(5)
| ~~~~~~
14 | s := Abc{}
15 | _ = Xyz(&s)
vlib/v/checker/tests/cannot_cast_to_struct.vv:15:6: error: cannot cast `&Abc` to struct
13 | _ = Xyz(5)
14 | s := Abc{}
15 | _ = Xyz(&s)
| ~~~~~~~
16 | }
|