Gitly
English
Русский
Español
日本語
中文
Português
Pricing
Log in
Register
v4
/
vlib
/
v
/
checker
/
tests
/
if_mut_with_immutable_var_err.vv
11
lines
·
10
sloc
·
123 bytes
·
1c6f63ac0ae1287a4759dedc8d29408b20fe5a78
Raw
1
type Int = int | u8
2
3
fn main() {
4
i := Int(0)
5
if mut i is int {
6
i = 1
7
} else if mut i is u8 {
8
i = 2
9
}
10
println(i)
11
}
12