Files
kotlin/compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt
Mikhail Glukhikh f85fc47383 FIR: introduce separate companion object resolve context
Before this commit, during the resolve of companion objects we used
the same context than for any nested class. However, during companion
object resolve we should not have companion object receiver itself
accessible in any case (in particular, it should not be accessible
in constructor). So in this commit we introduced separate context
for this purpose.
2021-01-18 08:32:06 +03:00

9 lines
177 B
Kotlin
Vendored

abstract class Base(val fn: () -> String)
interface Host {
companion object : Base(run { { Host.ok() } }) {
fun ok() = "OK"
}
}
fun box() = Host.Companion.fn()