blob: f9473ff1921c24ad56834be6888b724f1a5d4d05 [file]
fun foo(x : String) : String {
assert("abz]".hashCode() == "aby|".hashCode())
when (x) {
"abz]" -> return "abz"
"ghi" -> return "ghi"
"aby|" -> return "aby"
"abz]" -> return "fail"
}
return "other"
}
// Expecting 0 LOOKUPSWITCH as there is only 2 different hash codes. An IF cascade is more efficient.
// 0 LOOKUPSWITCH