summaryrefslogtreecommitdiff
path: root/test/files/run/virtpatmat_tailcalls_verifyerror.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-03-22 10:39:29 +0100
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-03-23 11:03:02 +0100
commitd786f269834c89e6de4a6a90e7a9f22c583bc30a (patch)
tree06c68ba36971b81799094856c6d22eb3cce6abfb /test/files/run/virtpatmat_tailcalls_verifyerror.scala
parentf8022c216d84af482b27c04c3c38a2d8dce9a192 (diff)
downloadscala-d786f269834c89e6de4a6a90e7a9f22c583bc30a.tar.gz
scala-d786f269834c89e6de4a6a90e7a9f22c583bc30a.tar.bz2
scala-d786f269834c89e6de4a6a90e7a9f22c583bc30a.zip
[vpm] avoid verifyerror: leave jump to tail-pos label
the following commit deals with the fall-out in basicblocks (double closing of blocks in ignore mode)
Diffstat (limited to 'test/files/run/virtpatmat_tailcalls_verifyerror.scala')
-rw-r--r--test/files/run/virtpatmat_tailcalls_verifyerror.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/run/virtpatmat_tailcalls_verifyerror.scala b/test/files/run/virtpatmat_tailcalls_verifyerror.scala
new file mode 100644
index 0000000000..1ee613f09e
--- /dev/null
+++ b/test/files/run/virtpatmat_tailcalls_verifyerror.scala
@@ -0,0 +1,13 @@
+// shouldn't result in a verify error when run...
+object Test extends App {
+ @annotation.tailrec
+ final def test(meh: Boolean): Boolean = {
+ Some("a") match {
+ case x =>
+ x match {
+ case _ => if(meh) test(false) else false
+ }
+ }
+ }
+ println(test(true))
+} \ No newline at end of file