Unreachable code with Nothing-returning functions

This commit is contained in:
Andrey Breslav
2011-04-14 19:23:49 +04:00
parent 4d92f75133
commit cf7991378a
24 changed files with 272 additions and 69 deletions
+23
View File
@@ -435,3 +435,26 @@ l3:
l1:
<END>
=====================
== tf ==
fun tf() {
try {
return 1
}
finally {
return 2
}
}
---------------------
l0:
<START>
jmp?(l2)
r(1)
r(2)
ret(*) l1
ret(*) l1
l2:
r(2)
ret(*) l1
l1:
<END>
=====================
+2 -2
View File
@@ -127,10 +127,10 @@ fun t8() {
fun blockAndAndMismatch() : Boolean {
<error>(return true) || (return false)</error>
<error>1</error>
<error>true</error>
}
fun tf() {
try {return} finally{return}
try {<error>return</error>} finally{return}
<error>1</error>
}