IR: unify 3 copies of function body remapping

Also,

  1. remove some redundant copies;

  2. fix remapping of non-local returns in lambdas if the body is moved
     after LocalDeclarationsLowering (the lambda is no longer inside the
     body, but must still be visited)
This commit is contained in:
pyos
2019-12-30 11:46:03 +01:00
committed by Georgy Bronnikov
parent 4d1677be06
commit 99eab5a058
15 changed files with 120 additions and 131 deletions
@@ -0,0 +1,16 @@
// FILE: 1.kt
package test
inline fun myRun(f: () -> Nothing): Nothing = f()
// FILE: 2.kt
import test.*
interface I {
val ok: String
get() { myRun { return "OK" } }
}
class C : I
fun box(): String = C().ok