aboutsummaryrefslogtreecommitdiff
path: root/v_windows/v/vlib/v/checker/tests/lock_already_rlocked.vv
blob: c8e823674a6973fb8e7381194257a9c61abc0d96 (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
	}
	rlock a {
		lock a {
			a.x++
		}
	}
	println(a.x)
}