v/vlib/v/checker/tests/lock_nonshared.vv

15 lines
99 B
V

struct St {
mut:
x int
}
fn main() {
mut a := &St{
x: 5
}
lock a {
a.x++
}
println(a)
}