Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
fmt
/
tests
/
static_mut_keep.vv
12
lines
·
11
sloc
·
191 bytes
·
757929392e0e7a75fc1272116460981e589737d5
Raw
1
@[unsafe]
2
fn foo() int {
3
mut static x := 42
4
x++
5
return x
6
}
7
8
@[unsafe]
9
fn foo() int {
10
static x := 42 // a immutable static is not very useful, but vfmt should support that too
11
return x
12
}
13