diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-08-28 13:34:32 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2013-08-28 13:34:32 -0700 |
commit | 8a292cb6eed15828762ed8291c723199da5100e5 (patch) | |
tree | 2ceaf5fb1546604d1178c866ce46c2d67c10ea3c /test | |
parent | a24fc60deed8fbed062ecd6ff96e434349cca75d (diff) | |
parent | 3b3f03749a15afad7b5428cc53bea0a5e759f94d (diff) | |
download | scala-8a292cb6eed15828762ed8291c723199da5100e5.tar.gz scala-8a292cb6eed15828762ed8291c723199da5100e5.tar.bz2 scala-8a292cb6eed15828762ed8291c723199da5100e5.zip |
Merge pull request #2863 from magarciaEPFL/backendish40
(1 of 2) of the rest of the new bytecode emitter + feedback
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t7407.check | 1 | ||||
-rw-r--r-- | test/files/run/t7407.flags | 1 | ||||
-rw-r--r-- | test/files/run/t7407.scala | 11 | ||||
-rw-r--r-- | test/files/run/t7407b.check | 2 | ||||
-rw-r--r-- | test/files/run/t7407b.flags | 1 | ||||
-rw-r--r-- | test/files/run/t7407b.scala | 20 |
6 files changed, 36 insertions, 0 deletions
diff --git a/test/files/run/t7407.check b/test/files/run/t7407.check new file mode 100644 index 0000000000..e965047ad7 --- /dev/null +++ b/test/files/run/t7407.check @@ -0,0 +1 @@ +Hello diff --git a/test/files/run/t7407.flags b/test/files/run/t7407.flags new file mode 100644 index 0000000000..c8547a27dc --- /dev/null +++ b/test/files/run/t7407.flags @@ -0,0 +1 @@ +-Ynooptimise -Ybackend:GenBCode diff --git a/test/files/run/t7407.scala b/test/files/run/t7407.scala new file mode 100644 index 0000000000..cf67602126 --- /dev/null +++ b/test/files/run/t7407.scala @@ -0,0 +1,11 @@ +// SI-7407 +object Test { + + def main(args: Array[String]) { println(foo) } + + def foo: String = { + try return "Hello" finally 10 match {case x => ()} + } + +} + diff --git a/test/files/run/t7407b.check b/test/files/run/t7407b.check new file mode 100644 index 0000000000..f30294447b --- /dev/null +++ b/test/files/run/t7407b.check @@ -0,0 +1,2 @@ +Hello +abc diff --git a/test/files/run/t7407b.flags b/test/files/run/t7407b.flags new file mode 100644 index 0000000000..c8547a27dc --- /dev/null +++ b/test/files/run/t7407b.flags @@ -0,0 +1 @@ +-Ynooptimise -Ybackend:GenBCode 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 => ()} + } + } + +} + |