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
This commit is contained in:
Stepan Koltsov
2011-11-23 18:15:37 +04:00
parent fed075b0ca
commit 5d2dfcd48f
17 changed files with 143 additions and 5 deletions
@@ -1,6 +1,6 @@
fun typeName(a: Any?) : String {
return when(a) {
is java.util.ArrayList<Int> => "array list"
is java.util.ArrayList<*> => "array list"
else => "no idea"
}
}
@@ -8,4 +8,4 @@ fun typeName(a: Any?) : String {
fun box() : String {
if(typeName(java.util.ArrayList<Int> ()) != "array list") return "array list failed"
return "OK"
}
}