vxx2 / vlib / v / checker / tests / match_mut_with_immutable_var_err.vv
10 lines · 9 sloc · 109 bytes · 173e6a943b43c332c1ead547e165b55ad4b74622
Raw
1type Int = int | u8
2
3fn main() {
4 i := Int(0)
5 match mut i {
6 int { i = 1 }
7 u8 { i = 2 }
8 }
9 println(i)
10}
11