vxx2 / vlib / v / checker / tests / invalid_const_expr_match_range_err.out
28 lines · 28 sloc · 1.22 KB · a9b41d298095cf7814e9597dfb0f6b9abdd1686b
Raw
1vlib/v/checker/tests/invalid_const_expr_match_range_err.vv:5:2: error: match branch range expressions need the start value to be known at compile time (only enums, const or literals are supported)
2 3 |
3 4 | match 5 {
4 5 | start...10 {
5 | ~~~~~
6 6 | println(start)
7 7 | }
8vlib/v/checker/tests/invalid_const_expr_match_range_err.vv:8:7: error: match branch range expressions need the end value to be known at compile time (only enums, const or literals are supported)
9 6 | println(start)
10 7 | }
11 8 | 10...end {
12 | ~~~
13 9 | println(end)
14 10 | }
15vlib/v/checker/tests/invalid_const_expr_match_range_err.vv:15:2: error: match branch range expressions need the start value to be known at compile time (only enums, const or literals are supported)
16 13 |
17 14 | a := match 5 {
18 15 | start...10 {
19 | ~~~~~
20 16 | 2
21 17 | }
22vlib/v/checker/tests/invalid_const_expr_match_range_err.vv:18:7: error: match branch range expressions need the end value to be known at compile time (only enums, const or literals are supported)
23 16 | 2
24 17 | }
25 18 | 10...end {
26 | ~~~
27 19 | 3
28 20 | }
29