Files
kotlin-fork/compiler/testData/codegen/box/when/is.kt
T
Mark Punzalan 5afab1ac2b [FIR] FIR2IR: Populate calls with type arguments and function type
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00

13 lines
271 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
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"
}