vxx2 / vlib / v / checker / tests / option_or_block_mismatch.out
13 lines · 13 sloc · 523 bytes · e2e5cf8db56f3562c7baa735061690be936bdf3e
Raw
1vlib/v/checker/tests/option_or_block_mismatch.vv:10:18: error: wrong return type `Bar` in the `or {}` block, expected `&Bar`
2 8 |
3 9 | fn main() {
4 10 | x := foo() or { Bar{} }
5 | ~~~~~
6 11 | println(x)
7 12 |
8vlib/v/checker/tests/option_or_block_mismatch.vv:13:13: error: the default expression type in the `or` block should be `&Bar`, instead you gave a value of type `Bar`
9 11 | println(x)
10 12 |
11 13 | foo() or { Bar{} }
12 | ~~~~~
13 14 | }
14