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

14 lines
255 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
fun foo(x : String) : String {
assert("abz]".hashCode() == "aby|".hashCode())
when (x) {
"abz]", "cde" -> return "abz_cde"
"aby|", "ghi" -> return "aby_ghi"
}
return "other"
}
// 1 LOOKUPSWITCH