| 1 | vlib/v/checker/tests/nil_to_option_err.vv:8:4: warning: cannot assign a reference to a value (this will be an error soon) left=int false right=nil true ptr=false |
| 2 | 6 | fn main() { |
| 3 | 7 | mut a := ?int(none) |
| 4 | 8 | a = unsafe { nil } |
| 5 | | ^ |
| 6 | 9 | |
| 7 | 10 | mut b := Test{} |
| 8 | vlib/v/checker/tests/nil_to_option_err.vv:7:6: warning: unused variable: `a` |
| 9 | 5 | |
| 10 | 6 | fn main() { |
| 11 | 7 | mut a := ?int(none) |
| 12 | | ^ |
| 13 | 8 | a = unsafe { nil } |
| 14 | 9 | |
| 15 | vlib/v/checker/tests/nil_to_option_err.vv:3:4: error: cannot assign `nil` to a non-pointer field |
| 16 | 1 | struct Test { |
| 17 | 2 | mut: |
| 18 | 3 | a ?int = unsafe { nil } |
| 19 | | ~~~~ |
| 20 | 4 | } |
| 21 | 5 | |
| 22 | vlib/v/checker/tests/nil_to_option_err.vv:8:6: error: cannot assign `nil` to option value |
| 23 | 6 | fn main() { |
| 24 | 7 | mut a := ?int(none) |
| 25 | 8 | a = unsafe { nil } |
| 26 | | ~~~~~~ |
| 27 | 9 | |
| 28 | 10 | mut b := Test{} |
| 29 | vlib/v/checker/tests/nil_to_option_err.vv:11:8: error: cannot assign `nil` to option value |
| 30 | 9 | |
| 31 | 10 | mut b := Test{} |
| 32 | 11 | b.a = unsafe { nil } |
| 33 | | ~~~~~~ |
| 34 | 12 | } |
| 35 | |