From d786f269834c89e6de4a6a90e7a9f22c583bc30a Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 22 Mar 2012 10:39:29 +0100 Subject: [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) --- test/files/run/virtpatmat_tailcalls_verifyerror.check | 1 + test/files/run/virtpatmat_tailcalls_verifyerror.flags | 1 + test/files/run/virtpatmat_tailcalls_verifyerror.scala | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 test/files/run/virtpatmat_tailcalls_verifyerror.check create mode 100644 test/files/run/virtpatmat_tailcalls_verifyerror.flags create mode 100644 test/files/run/virtpatmat_tailcalls_verifyerror.scala (limited to 'test/files/run') diff --git a/test/files/run/virtpatmat_tailcalls_verifyerror.check b/test/files/run/virtpatmat_tailcalls_verifyerror.check new file mode 100644 index 0000000000..c508d5366f --- /dev/null +++ b/test/files/run/virtpatmat_tailcalls_verifyerror.check @@ -0,0 +1 @@ +false diff --git a/test/files/run/virtpatmat_tailcalls_verifyerror.flags b/test/files/run/virtpatmat_tailcalls_verifyerror.flags new file mode 100644 index 0000000000..9769db9257 --- /dev/null +++ b/test/files/run/virtpatmat_tailcalls_verifyerror.flags @@ -0,0 +1 @@ + -Yvirtpatmat -Xexperimental 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 -- cgit v1.2.3