Files
kotlin/compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt
Dmitry Petrov 6b6d1e80f8 Fix enum entry reference from enum entry initialization context
Enum entries are "special" kind of singletons that should be
referenced as a captured 'this' instance inside during entry
initialization, because corresponding static fields in enum class
are not initialized yet.

 #KT-7257 Fixed
2017-09-12 11:00:24 +03:00

24 lines
404 B
Kotlin
Vendored

// LANGUAGE_VERSION: 1.2
enum class A {
X {
val x = "OK"
inner class Inner {
inner class Inner2 {
inner class Inner3 {
val y = x
}
}
}
val z = Inner().Inner2().Inner3()
override val test: String
get() = z.y
};
abstract val test: String
}
fun box() = A.X.test