Files
kotlin/compiler/testData/codegen/bytecodeText/whenStringOptimization/inlineStringConstInsideWhen.kt
2018-12-21 16:20:45 +01:00

14 lines
228 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
const val y = "cde"
fun foo(x : String) : String {
when (x) {
"abc", "${y}" -> return "abc_cde"
"e" + "fg", "ghi" -> return "efg_ghi"
}
return "other"
}
// 1 LOOKUPSWITCH