v/vlib/v/checker/tests/if_match_expr.out

43 lines
2.0 KiB
Plaintext

vlib/v/checker/tests/if_match_expr.vv:8:6: error: `if` expression branch has unsupported statement (`v.ast.ForStmt`)
6 | if true {1} else {-1} // result
7 | } else {
8 | for {break}
| ^
9 | {}
10 | match true {true {} else {}} // statement not expression
vlib/v/checker/tests/if_match_expr.vv:9:2: error: `if` expression branch has unsupported statement (`v.ast.Block`)
7 | } else {
8 | for {break}
9 | {}
| ^
10 | match true {true {} else {}} // statement not expression
11 | _ = match true {true {1} else {-1}} // OK
vlib/v/checker/tests/if_match_expr.vv:10:2: error: `if` expression branch has unsupported statement (`v.ast.MatchExpr`)
8 | for {break}
9 | {}
10 | match true {true {} else {}} // statement not expression
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 | _ = match true {true {1} else {-1}} // OK
12 | match true {true {1} else {-1}} // result
vlib/v/checker/tests/if_match_expr.vv:17:3: error: `match` expression branch has unsupported statement (`v.ast.IfExpr`)
15 | _ = match true {
16 | true {
17 | if true {} // statement not expression
| ~~
18 | _ = if true {1} else {-1} // OK
19 | if true {1} else {-1} // result
vlib/v/checker/tests/if_match_expr.vv:22:10: error: `match` expression branch has unsupported statement (`v.ast.AssertStmt`)
20 | }
21 | else {
22 | assert true
| ~~~~
23 | match true {true {} else {}} // statement not expression
24 | _ = match true {true {1} else {-1}} // OK
vlib/v/checker/tests/if_match_expr.vv:23:3: error: `match` expression branch has unsupported statement (`v.ast.MatchExpr`)
21 | else {
22 | assert true
23 | match true {true {} else {}} // statement not expression
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 | _ = match true {true {1} else {-1}} // OK
25 | match true {true {1} else {-1}} // result