v2 / vlib / v / checker / tests / or_block_check_err.out
27 lines · 27 sloc · 1.71 KB · 62bdf990d03b069db82d75b35b547f9191942134
Raw
1vlib/v/checker/tests/or_block_check_err.vv:6:36: error: expression requires a non empty `or {}` block
2 4 |
3 5 | fn main() {
4 6 | _ = callexpr_with_or_block_call() or {}.replace('a', 'b')
5 | ~~~~~
6 7 | _ = (callexpr_with_or_block_call() or {}).replace('a', 'b')
7 8 |
8vlib/v/checker/tests/or_block_check_err.vv:7:37: error: expression requires a non empty `or {}` block
9 5 | fn main() {
10 6 | _ = callexpr_with_or_block_call() or {}.replace('a', 'b')
11 7 | _ = (callexpr_with_or_block_call() or {}).replace('a', 'b')
12 | ~~~~~
13 8 |
14 9 | _ = callexpr_with_or_block_call() or { eprintln('error') }.replace('a', 'b')
15vlib/v/checker/tests/or_block_check_err.vv:9:41: error: `or` block must provide a default value of type `string`, or return/continue/break or call a @[noreturn] function like panic(err) or exit(1)
16 7 | _ = (callexpr_with_or_block_call() or {}).replace('a', 'b')
17 8 |
18 9 | _ = callexpr_with_or_block_call() or { eprintln('error') }.replace('a', 'b')
19 | ~~~~~~~~~~~~~~~~~
20 10 | _ = (callexpr_with_or_block_call() or { eprintln('error') }).replace('a', 'b')
21 11 | }
22vlib/v/checker/tests/or_block_check_err.vv:10:42: error: `or` block must provide a default value of type `string`, or return/continue/break or call a @[noreturn] function like panic(err) or exit(1)
23 8 |
24 9 | _ = callexpr_with_or_block_call() or { eprintln('error') }.replace('a', 'b')
25 10 | _ = (callexpr_with_or_block_call() or { eprintln('error') }).replace('a', 'b')
26 | ~~~~~~~~~~~~~~~~~
27 11 | }
28