Files
kotlin-fork/compiler/testData/codegen/box/when/is.kt
T
2018-06-09 19:15:38 +03:00

13 lines
271 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
fun typeName(a: Any?) : String {
return when(a) {
is ArrayList<*> -> "array list"
else -> "no idea"
}
}
fun box() : String {
if(typeName(ArrayList<Int>()) != "array list") return "array list failed"
return "OK"
}