v2 / vlib / v / checker / tests / undefined_ident_in_ref_selector.out
25 lines · 25 sloc · 972 bytes · 1512486d01d4205e7b67ebd679238fa45cd348af
Raw
1vlib/v/checker/tests/undefined_ident_in_ref_selector.vv:6:10: error: undefined ident: `line`
2 4 |
3 5 | fn read() int {
4 6 | return &line.len
5 | ~~~~
6 7 | }
7vlib/v/checker/tests/undefined_ident_in_ref_selector.vv:6:15: error: `line` does not return a value
8 4 |
9 5 | fn read() int {
10 6 | return &line.len
11 | ~~~
12 7 | }
13vlib/v/checker/tests/undefined_ident_in_ref_selector.vv:6:9: error: cannot use `void` as type `int` in return argument
14 4 |
15 5 | fn read() int {
16 6 | return &line.len
17 | ^
18 7 | }
19vlib/v/checker/tests/undefined_ident_in_ref_selector.vv:6:9: error: fn `read` expects you to return a non reference type `int`, but you are returning `void` instead
20 4 |
21 5 | fn read() int {
22 6 | return &line.len
23 | ^
24 7 | }
25Details: use `return *pointer` instead of `return pointer`, and just `return value` instead of `return &value`
26