v2 / vlib / v / checker / tests / go_wait_or.out
48 lines · 48 sloc · 1.77 KB · d61022c346c1f14e301db28885804f2dbe4a1ef7
Raw
1vlib/v/checker/tests/go_wait_or.vv:5:6: notice: unused parameter: `n`
2 3 | }
3 4 |
4 5 | fn e(n int) {}
5 | ^
6 6 |
7 7 | fn f(n int) ?f64 {
8vlib/v/checker/tests/go_wait_or.vv:11:6: notice: unused parameter: `n`
9 9 | }
10 10 |
11 11 | fn g(n int) ? {}
12 | ^
13 12 |
14 13 | fn main() {
15vlib/v/checker/tests/go_wait_or.vv:18:16: error: unexpected `?`, the function `wait` does not return an Option
16 16 | spawn d(1),
17 17 | ]
18 18 | r := tg.wait()?
19 | ^
20 19 | println(r)
21 20 | s := tg[0].wait() or { panic('problem') }
22vlib/v/checker/tests/go_wait_or.vv:20:20: error: unexpected `or` block, the function `wait` does not return an Option or a Result
23 18 | r := tg.wait()?
24 19 | println(r)
25 20 | s := tg[0].wait() or { panic('problem') }
26 | ~~~~~~~~~~~~~~~~~~~~~~~
27 21 | println(s)
28 22 | tg2 := [
29vlib/v/checker/tests/go_wait_or.vv:26:13: error: unexpected `or` block, the function `wait` does not return an Option or a Result
30 24 | spawn e(1),
31 25 | ]
32 26 | tg2.wait() or { panic('problem') }
33 | ~~~~~~~~~~~~~~~~~~~~~~~
34 27 | tg2[0].wait()?
35 28 | tg3 := [
36vlib/v/checker/tests/go_wait_or.vv:27:15: error: unexpected `?`, the function `wait` does not return an Option
37 25 | ]
38 26 | tg2.wait() or { panic('problem') }
39 27 | tg2[0].wait()?
40 | ^
41 28 | tg3 := [
42 29 | spawn f(0),
43vlib/v/checker/tests/go_wait_or.vv:47:13: error: option handling cannot be done in `spawn` call. Do it when calling `.wait()`
44 45 | tg4.wait()
45 46 | tg4[0].wait()
46 47 | spawn g(3) or { panic('problem') }
47 | ~~~~~~~~~~~~~~~~~~~~~~~
48 48 | }
49