Test for fail() function

This commit is contained in:
Andrey Breslav
2011-04-14 20:40:04 +04:00
parent 3488e2ba23
commit e2fbc5f792
+17
View File
@@ -134,3 +134,20 @@ fun tf() {
try {<error>return</error>} finally{return} try {<error>return</error>} finally{return}
<error>1</error> <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()
}