KT-4825 Implement "synchronized" properly via monitorenter/monitorexit
#KT-4825 Fixed
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
fun box(): String {
|
||||
val obj = "" as java.lang.Object
|
||||
val obj2 = "1" as java.lang.Object
|
||||
|
||||
synchronized (obj) {
|
||||
synchronized (obj2) {
|
||||
obj.wait(1)
|
||||
obj2.wait(1)
|
||||
}
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user