KT-1041 Add check that thrown/catched expression is of Throwable type

This commit is contained in:
Svetlana Isakova
2012-02-20 13:46:34 +04:00
parent 3d3b41da4f
commit 046c13a264
12 changed files with 47 additions and 13 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ fun <T: Exception> failsWith(block: ()-> Any) {
}
fun todo(block: ()-> Any) {
println("TODO at " + Exception().getStackTrace()?.get(1) + " for " + block)
println("TODO at " + (Exception() as java.lang.Throwable).getStackTrace()?.get(1) + " for " + block)
}
/*