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