| 1 | vlib/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 | } |
| 8 | vlib/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 | } |
| 15 | vlib/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 | } |
| 22 | vlib/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 | |