aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/checker/tests/lock_already_locked.vv
blob: 7bb636578f8d3d6c6fac91e27b83cabfa0134189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
struct St {
mut:
	x int
}

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