Files
kotlin-fork/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt
T
2020-06-08 12:11:33 +03:00

24 lines
411 B
Kotlin
Vendored

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()