2d1abda9a1
Also includes minor test fix, related to KT-14900
18 lines
388 B
Plaintext
Vendored
18 lines
388 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
fun test(x: Any) {
|
|
var res: String
|
|
<caret>res = if (x is String)
|
|
when {
|
|
x.length > 3 -> "long string"
|
|
else -> "short string"
|
|
}
|
|
else if (x is Int)
|
|
when {
|
|
x > 999 || x < -99 -> "long int"
|
|
else -> "short int"
|
|
}
|
|
else if (x is Long)
|
|
TODO()
|
|
else
|
|
"I don't know"
|
|
} |