v2 / vlib / v / checker / tests / array_init_element_option_mismatch_err.out
20 lines · 20 sloc · 786 bytes · 2d97f16a3d2354a26b3e1c0a2e3593f3b6e2af40
Raw
1vlib/v/checker/tests/array_init_element_option_mismatch_err.vv:8:11: error: cannot use `?string` as `string`, it must be unwrapped first
2 6 | fn main() {
3 7 | str := ?string(none)
4 8 | _ = ['', str]
5 | ~~~
6 9 |
7 10 | foo := Foo{}
8vlib/v/checker/tests/array_init_element_option_mismatch_err.vv:11:18: error: cannot use `?string` as `string`, it must be unwrapped first
9 9 |
10 10 | foo := Foo{}
11 11 | _ = [foo.a, foo.b]
12 | ^
13 12 | _ = [foo.b, foo.a]
14 13 | }
15vlib/v/checker/tests/array_init_element_option_mismatch_err.vv:12:18: error: cannot use `string` as `?string`
16 10 | foo := Foo{}
17 11 | _ = [foo.a, foo.b]
18 12 | _ = [foo.b, foo.a]
19 | ^
20 13 | }
21