vxx2 / vlib / v / checker / tests / invalid_const_expr_match_range_err.vv
25 lines · 23 sloc · 191 bytes · a9b41d298095cf7814e9597dfb0f6b9abdd1686b
Raw
1start := 1
2end := 20
3
4match 5 {
5 start...10 {
6 println(start)
7 }
8 10...end {
9 println(end)
10 }
11 else {}
12}
13
14a := match 5 {
15 start...10 {
16 2
17 }
18 10...end {
19 3
20 }
21 else {
22 1
23 }
24}
25println(a)
26