Files
kotlin-fork/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt
T
2023-12-26 10:18:19 +00:00

26 lines
454 B
Kotlin
Vendored

// JVM_ABI_K1_K2_DIFF: KT-62714, KT-63880
interface IFoo {
fun foo(): String
}
interface IBar {
fun bar(): String
}
enum class Test : IFoo, IBar {
FOO {
// FOO referenced from inner class constructor with initialized 'this'
inner class Inner {
val fooFoo = FOO.foo()
}
val z = Inner()
override fun foo() = "OK"
override fun bar() = z.fooFoo
}
}
fun box() = Test.FOO.bar()