KT-7819 Borrow tests for non-local returns from JVM backend

This commit is contained in:
Alexey Andreev
2016-04-04 16:45:48 +03:00
parent f7db1f934c
commit a6e1bd1d89
9 changed files with 558 additions and 12 deletions
@@ -13,6 +13,8 @@ inline fun foo(f: () -> Unit) {
// FILE: 2.kt
// TODO: enabled when KT-6397 gets fixed
// TARGET_BACKEND: JVM
import test.*
var p = "fail"
@@ -21,7 +21,7 @@ fun call(): String {
}
inline fun nonLocal(): String {
mysynchronized(Object()) {
mysynchronized("__LOCK__") {
return "nonLocal"
}
return "local"
@@ -21,7 +21,7 @@ fun monitorCall(lock: Any) {
import test.*
public class ClassA {
val LOCK = Object()
val LOCK = "__LOCK__"
var result = "fail"