Files
kotlin/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt
2019-11-19 11:00:09 +03:00

25 lines
441 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
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()