Test for fail() function

This commit is contained in:
Andrey Breslav
2011-04-14 20:40:04 +04:00
parent 3488e2ba23
commit e2fbc5f792
+18 -1
View File
@@ -133,4 +133,21 @@ fun blockAndAndMismatch() : Boolean {
fun tf() {
try {<error>return</error>} finally{return}
<error>1</error>
}
}
fun failtest(a : Int) {
<error>if (fail() || true) {
}</error>
<error>1</error>
}
fun foo(a : Nothing) : Unit {
1
a
<error>2</error>
}
fun fail() : Nothing {
throw new java.lang.RuntimeException()
}