Files
kotlin/compiler/testData/codegen/bytecodeText/whenStringOptimization/denseHashCode.kt
Denis Zharkov d4cb822ee8 When by String constants:
Generate TABLESWITCH/LOOKUPSWITCH bytecode operation for when operator by String constants
2014-07-21 17:13:56 +04:00

16 lines
257 B
Kotlin
Vendored

fun foo() : Int {
val x : String = "dsa"
when (x) {
"a" -> return 1
"b" -> return 1
"c" -> return 1
"d" -> return 1
"e" -> return 1
"f" -> return 1
else -> return -1
}
}
// 1 TABLESWITCH