vxx2 / vlib / v / checker / tests / option_propagate_nested.out
56 lines · 56 sloc · 2.15 KB · 1512486d01d4205e7b67ebd679238fa45cd348af
Raw
1vlib/v/checker/tests/option_propagate_nested.vv:10:18: error: to propagate the Option call, `xx_prop` must return an Option
2 8 |
3 9 | fn xx_prop() string {
4 10 | s := ret(raise()?)
5 | ^
6 11 | return s
7 12 | }
8Details: vlib/v/checker/tests/option_propagate_nested.vv:9:14: details: prepend ? before the declaration of the return type of `xx_prop`
9 7 | }
10 8 |
11 9 | fn xx_prop() string {
12 | ~~~~~~
13 10 | s := ret(raise()?)
14 11 | return s
15vlib/v/checker/tests/option_propagate_nested.vv:10:18: error: to propagate the call, `xx_prop` must return an Option type
16 8 |
17 9 | fn xx_prop() string {
18 10 | s := ret(raise()?)
19 | ^
20 11 | return s
21 12 | }
22Details: vlib/v/checker/tests/option_propagate_nested.vv:9:14: details: prepend ? before the declaration of the return type of `xx_prop`
23 7 | }
24 8 |
25 9 | fn xx_prop() string {
26 | ~~~~~~
27 10 | s := ret(raise()?)
28 11 | return s
29vlib/v/checker/tests/option_propagate_nested.vv:28:21: error: to propagate the Result call, `aa_propagate` must return a Result
30 26 |
31 27 | fn (mut s St) aa_propagate() {
32 28 | f := retf(s.raise()!)
33 | ^
34 29 | s.z = 7.5
35 30 | println(f)
36Details: vlib/v/checker/tests/option_propagate_nested.vv:27:30: details: prepend ! before the declaration of the return type of `aa_propagate`
37 25 | }
38 26 |
39 27 | fn (mut s St) aa_propagate() {
40 | ^
41 28 | f := retf(s.raise()!)
42 29 | s.z = 7.5
43vlib/v/checker/tests/option_propagate_nested.vv:28:21: error: to propagate the call, `aa_propagate` must return a Result type
44 26 |
45 27 | fn (mut s St) aa_propagate() {
46 28 | f := retf(s.raise()!)
47 | ^
48 29 | s.z = 7.5
49 30 | println(f)
50Details: vlib/v/checker/tests/option_propagate_nested.vv:27:30: details: prepend ! before the declaration of the return type of `aa_propagate`
51 25 | }
52 26 |
53 27 | fn (mut s St) aa_propagate() {
54 | ^
55 28 | f := retf(s.raise()!)
56 29 | s.z = 7.5
57