Files
kotlin-fork/compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt
T
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00

14 lines
348 B
Kotlin
Vendored

enum class Test(val x: String, val closure1: () -> String) {
FOO("O", run { { FOO.x } }) {
override val y: String = "K"
val closure2 = { y } // Implicit 'FOO'
override val z: String = closure2()
};
abstract val y: String
abstract val z: String
fun test() = closure1() + z
}
fun box() = Test.FOO.test()