v/vlib/v/checker/tests/incorrect_smartcast_err.out

15 lines
644 B
Plaintext

vlib/v/checker/tests/incorrect_smartcast_err.vv:10:5: notice: smartcasting requires either an immutable value, or an explicit mut keyword before the value
8 | fn main(){
9 | mut example := IExample(Example{field:"test"})
10 | if example is Example{
| ~~~~~~~
11 | println(example.field)
12 | }
vlib/v/checker/tests/incorrect_smartcast_err.vv:11:19: error: type `IExample` has no field named `field`
9 | mut example := IExample(Example{field:"test"})
10 | if example is Example{
11 | println(example.field)
| ~~~~~
12 | }
13 | }