v2 / vlib / v / checker / tests / comptime_match_cond_cannot_mut.vv
18 lines · 17 sloc · 153 bytes · 603cd903374f915e72df23d559d648f5804ae770
Raw
1fn main() {
2 mut x := 1
3 $match x {
4 1 {
5 println('1')
6 }
7 2 {
8 println('2')
9 }
10 }
11
12 y := 100
13 $match mut y {
14 100 {
15 println('100')
16 }
17 }
18}
19