Files
kotlin-fork/compiler/testData/codegen/box/when/enumOptimization/notAllEntriesAreConstants.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

22 lines
289 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
enum class E {
A, B;
}
fun bar(): E = E.A
fun foo(e: E): String {
val c = when (e) {
E.B -> "B"
bar() -> "OK"
else -> "else"
}
return c
}
fun box() = foo(bar())
// CHECK_BYTECODE_TEXT
// 0 WhenMappings
// 0 TABLESWITCH