v/vlib/v/checker/tests/lock_already_locked.vv

17 lines
121 B
V

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