summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2010-01-07 11:00:20 +0000
committerIulian Dragos <jaguarul@gmail.com>2010-01-07 11:00:20 +0000
commit57f14277dad0427b90abc1e6f70e2f8ae4dcbb51 (patch)
tree36b1d1cc5f30a28edab08120d2f2f21d3eef4f97 /test/files/run
parent7315339782f6e19ddd6199768352a91ef66eb27d (diff)
downloadscala-57f14277dad0427b90abc1e6f70e2f8ae4dcbb51.tar.gz
scala-57f14277dad0427b90abc1e6f70e2f8ae4dcbb51.tar.bz2
scala-57f14277dad0427b90abc1e6f70e2f8ae4dcbb51.zip
Fixed #2850 -- while inside finally causes Veri...
Fixed #2850 -- while inside finally causes VerifyError, review by rytz
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/exceptions-2.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/exceptions-2.scala b/test/files/run/exceptions-2.scala
index 820ab3634d..05aab66dd0 100644
--- a/test/files/run/exceptions-2.scala
+++ b/test/files/run/exceptions-2.scala
@@ -267,6 +267,23 @@ object Test {
try { 1 } catch { case e: java.io.IOException => () }
}
+ /** Test that empty finally clauses containing while are correctly emitted.
+ */
+ class Issue {
+ var b = 0
+ try {
+ // println("abc")
+ } finally {
+ while (b == -1) {b = 0}
+ }
+ }
+
+ /* Tests that class Issue passes verification. */
+ def whileInFinally = {
+ new Issue
+ }
+
+
def main(args: Array[String]): Unit = {
Console.println("nested1: ");
@@ -326,5 +343,7 @@ object Test {
Console.println("Return with finally clause that cleans the stack")
returnWithFinallyClean
+
+ whileInFinally
}
}