Fix for KT-16532: Kotlin 1.1 RC - Android cross-inline synchronized won't run

Finnaly markers are used only for non-local return processing and are removed after inlining  to non-inline functions, same deletion should be performed on inlining to anonymous objects

 #KT-16532 Fixed
This commit is contained in:
Mikhael Bogdanov
2017-02-28 11:58:29 +01:00
parent 387c91f957
commit 21de67cac1
5 changed files with 56 additions and 23 deletions

View File

@@ -0,0 +1,25 @@
inline fun test(crossinline l: () -> String) {
{
l()
}()
object {
val z = l() //constuctor
}
}
fun box(): String {
var z = "fail"
test {
synchronized("123") {
z = "OK"
z
}
}
return z
}
// 0 finallyStart
// 0 finallyEnd