Files
kotlin/compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt
Ting-Yuan Huang 0dd09ea7de JVM_IR: Lower IrGetEnumValue to this whenever possible.
The reference can be lowered to `this` if it is captured in the lexical
scope of the corresponding enum entry, and not used by the enum entry's
super constructor. Otherwise, it is lowered to
`GETFIELD SomeEnum.SomeEntry`.
2019-04-12 08:58:43 +02:00

18 lines
233 B
Kotlin
Vendored

enum class A {
X {
val x = "OK"
inner class Inner {
fun foo() = x
}
val z = Inner()
override val test = z.foo()
};
abstract val test: String
}
fun box() = A.X.test