Files
kotlin-fork/compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_nested.kt
T
pyos 1310a65f0c JVM: rename this$0 when regenerating nested objects too
In the old backend, this was unnecessary because nested objects would
reference their lambdas' captures through the original this$0. On
JVM_IR, using loose capture fields means a name/descriptor clash can
occur on any level of nesting, not just the top.
2021-02-17 07:56:03 +01:00

15 lines
224 B
Kotlin
Vendored

// FILE: 1.kt
package test
class C(val x: String) {
fun f(y: String) = C(y).g { x }
inline fun g(crossinline h: () -> String) =
{ { h() + x }() }()
}
// FILE: 2.kt
import test.*
fun box() = C("O").f("K")