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