RosettaCodeData/Task/Variables/V-(Vlang)/variables-6.v
2026-04-30 12:34:36 -04:00

7 lines
159 B
V

fn main() {
a := 10
if true { a := 20 } // error: redefinition of `a`
mut b := 20
if true { b = 30 } // OK: `b` is mutable and used `=` to change value
}