Basic tests for dead code detection

This commit is contained in:
Andrey Breslav
2011-04-13 17:48:51 +04:00
parent 69ef281d47
commit 96526603e4
17 changed files with 164 additions and 26 deletions
+38
View File
@@ -0,0 +1,38 @@
fun t1() {
return
<error>1</error>
}
fun t2() {
if (1 > 2)
return
else return
<error>1</error>
}
fun t3() {
if (1 > 2)
return 2
else return ""
<error>1</error>
}
fun t4(a : Boolean) {
do {
return
}
while (<error>a</error>)
<error>1</error>
}
//fun t5() {
// do {
// return
// }
// while (1 > 2)
// 1
//}
//fun blockAndAndMismatch() : Boolean {
// (return true) || (return false)
//}