vxx2 / vlib / v / checker / tests / interface_struct_comparison_err.out
14 lines · 14 sloc · 750 bytes · 856b923cc9ec4c0628f094eae6fd735ab5c5a669
Raw
1vlib/v/checker/tests/interface_struct_comparison_err.vv:22:30: error: `?IGameObject` cannot be used as `GameObject`, unwrap the option first
2 20 | fn (mut gameobject GameObject) collision(mut o IGameObject) {
3 21 | _ = o
4 22 | if gameobject != gameobject.owner {
5 | ~~~~~
6 23 | eprintln('Collision')
7 24 | }
8vlib/v/checker/tests/interface_struct_comparison_err.vv:22:5: error: infix expr: cannot use `IGameObject` (right expression) as `GameObject`
9 20 | fn (mut gameobject GameObject) collision(mut o IGameObject) {
10 21 | _ = o
11 22 | if gameobject != gameobject.owner {
12 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 23 | eprintln('Collision')
14 24 | }
15