v/vlib/v/checker/tests/if_mut_with_immutable_var_e...

12 lines
127 B
V

type Int = byte | int
fn main() {
i := Int(0)
if mut i is int {
i = 1
} else if mut i is byte {
i = 2
}
println(i)
}