summaryrefslogtreecommitdiff
path: root/test/files/run/t7407b.scala
diff options
context:
space:
mode:
authorMiguel Garcia <miguelalfredo.garcia@epfl.ch>2013-08-21 17:11:21 +0200
committerMiguel Garcia <miguelalfredo.garcia@epfl.ch>2013-08-21 17:11:21 +0200
commit2a659cf0edb897e0e18c1604c1ec5950b623827a (patch)
treeb28fd600a86e2d1a60df8ee27ee4f43d18c9bd5e /test/files/run/t7407b.scala
parent738441cf58136bd4af9985886dd0cd38ccda0777 (diff)
downloadscala-2a659cf0edb897e0e18c1604c1ec5950b623827a.tar.gz
scala-2a659cf0edb897e0e18c1604c1ec5950b623827a.tar.bz2
scala-2a659cf0edb897e0e18c1604c1ec5950b623827a.zip
SI-7407 fixed in GenBCode but beware, it remains a bug in GenASM
GenBCode runs only under a flag, and moreover only if -optimise is not present (see ScalaSettings for details). Therefore during a nightly, when tests are run under -optimise, we need -Ynooptimise to deactivate the optimizer. With that, GenBCode can run and tackle the test case successfuly.
Diffstat (limited to 'test/files/run/t7407b.scala')
-rw-r--r--test/files/run/t7407b.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/t7407b.scala b/test/files/run/t7407b.scala
new file mode 100644
index 0000000000..b0c00878b5
--- /dev/null
+++ b/test/files/run/t7407b.scala
@@ -0,0 +1,20 @@
+object Test {
+
+ def main(args: Array[String]) {
+ println(foo(true))
+ println(foo(false))
+ }
+
+ def foo(b: Boolean): String = {
+ try {
+ if(b)
+ return "Hello"
+ else
+ "abc"
+ } finally {
+ 10 match {case x => ()}
+ }
+ }
+
+}
+