Files
kotlin/compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt
2018-06-09 19:15:38 +03:00

25 lines
436 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_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()