Merge boxWithStdlib testData into box, delete BoxWithStdlib test

This commit is contained in:
Alexander Udalov
2016-03-07 13:36:14 +03:00
committed by Alexander Udalov
parent 22bfc9786a
commit 06a67e6602
535 changed files with 3520 additions and 3871 deletions
+23
View File
@@ -0,0 +1,23 @@
// WITH_RUNTIME
fun <T> test1() = null as T
fun <T> test2(): T {
val a : Any? = null
return a as T
}
fun <T: Any> test3() = null as T
fun box(): String {
if (test1<Int?>() != null) return "fail: test1"
if (test2<Int?>() != null) return "fail: test2"
var result3 = "fail"
try {
test3<Int>()
}
catch(e: TypeCastException) {
result3 = "OK"
}
if (result3 != "OK") return "fail: test3"
return "OK"
}