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:
+16
@@ -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
|
||||
Reference in New Issue
Block a user