Files
kotlin/compiler/testData/codegen/patternMatching/is.jet
Stepan Koltsov 7020d6e15c more check for casts
KT-445 (Don't allow deep instanceof for erased parameters) and more

see new tests in compiler/testData/checkerWithErrorTypes/full/cast
2011-11-24 23:52:10 +04:00

12 lines
267 B
Plaintext

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