mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 00:21:26 +00:00
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:
25
compiler/testData/codegen/bytecodeText/inline/finallyMarkers.kt
vendored
Normal file
25
compiler/testData/codegen/bytecodeText/inline/finallyMarkers.kt
vendored
Normal 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
|
||||
Reference in New Issue
Block a user