vxx2 / vlib / v / checker / tests / option_wrapped_cmp_op_err.out
27 lines · 27 sloc · 1.11 KB · 052d862244e04dec20582eec248e5cb548060cc4
Raw
1vlib/v/checker/tests/option_wrapped_cmp_op_err.vv:3:10: error: `?string` cannot be used as `string`, unwrap the option first
2 1 | fn main() {
3 2 | a := ?string('hi')
4 3 | println(a == 'hi')
5 | ^
6 4 | println('hi' == a)
7 5 | println(a != 'hi')
8vlib/v/checker/tests/option_wrapped_cmp_op_err.vv:4:18: error: `?string` cannot be used as `string`, unwrap the option first
9 2 | a := ?string('hi')
10 3 | println(a == 'hi')
11 4 | println('hi' == a)
12 | ^
13 5 | println(a != 'hi')
14 6 | println('hi' != a)
15vlib/v/checker/tests/option_wrapped_cmp_op_err.vv:5:10: error: `?string` cannot be used as `string`, unwrap the option first
16 3 | println(a == 'hi')
17 4 | println('hi' == a)
18 5 | println(a != 'hi')
19 | ^
20 6 | println('hi' != a)
21 7 | }
22vlib/v/checker/tests/option_wrapped_cmp_op_err.vv:6:18: error: `?string` cannot be used as `string`, unwrap the option first
23 4 | println('hi' == a)
24 5 | println(a != 'hi')
25 6 | println('hi' != a)
26 | ^
27 7 | }
28