ci: fix static_vars_in_translated_mode.vv
parent
5e87eeb864
commit
e564269477
|
@ -1,12 +1,13 @@
|
|||
[unsafe]
|
||||
fn counter() int {
|
||||
mut static icounter := 0
|
||||
static mut icounter := 0
|
||||
icounter++
|
||||
return icounter
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println(counter())
|
||||
println(counter())
|
||||
println(counter())
|
||||
println(counter())
|
||||
println(unsafe { counter() })
|
||||
println(unsafe { counter() })
|
||||
println(unsafe { counter() })
|
||||
println(unsafe { counter() })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue