v/vlib/v/checker/tests/static_vars_in_translated_m...

13 lines
215 B
V

fn counter() int {
mut static icounter := 0
icounter++
return icounter
}
fn main() {
println(unsafe { counter() })
println(unsafe { counter() })
println(unsafe { counter() })
println(unsafe { counter() })
}