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