vxx2 / vlib / v / checker / tests / incorrect_smartcast_err.out
28 lines · 28 sloc · 1.09 KB · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1vlib/v/checker/tests/incorrect_smartcast_err.vv:12:5: notice: smartcasting requires either an immutable value, or an explicit mut keyword before the value
2 10 | field: 'test'
3 11 | })
4 12 | if example is Example {
5 | ~~~~~~~
6 13 | println(example.field)
7 14 | }
8vlib/v/checker/tests/incorrect_smartcast_err.vv:12:5: error: smart casting a mutable interface value requires `if mut example is ...`
9 10 | field: 'test'
10 11 | })
11 12 | if example is Example {
12 | ~~~~~~~
13 13 | println(example.field)
14 14 | }
15vlib/v/checker/tests/incorrect_smartcast_err.vv:13:19: error: type `IExample` has no field named `field`
16 11 | })
17 12 | if example is Example {
18 13 | println(example.field)
19 | ~~~~~
20 14 | }
21 15 | }
22vlib/v/checker/tests/incorrect_smartcast_err.vv:13:3: error: `println` can not print void expressions
23 11 | })
24 12 | if example is Example {
25 13 | println(example.field)
26 | ~~~~~~~~~~~~~~~~~~~~~~
27 14 | }
28 15 | }
29