Merge boxWithStdlib testData into box, delete BoxWithStdlib test
This commit is contained in:
committed by
Alexander Udalov
parent
22bfc9786a
commit
06a67e6602
@@ -0,0 +1,17 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
foo() as Int?
|
||||
}
|
||||
catch (e: ClassCastException) {
|
||||
return "OK"
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
return "Fail: ClassCastException should have been thrown, but was instead ${e.javaClass.getName()}: ${e.message}"
|
||||
}
|
||||
|
||||
return "Fail: no exception was thrown"
|
||||
}
|
||||
Reference in New Issue
Block a user