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