Fix inline codegen on local functions inside inlined lambda
The problem was that anonymous classes wasn't regenerated although they capture another anonymous class that is a subject for regeneration #KT-8689 Fixed
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
public inline fun myRun(block: () -> Unit) {
|
||||
return block()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
var res = ""
|
||||
myRun {
|
||||
val x = object {
|
||||
fun foo() {
|
||||
res = "OK"
|
||||
}
|
||||
}
|
||||
object {
|
||||
fun bar() = x.foo()
|
||||
}.bar()
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user