summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMiguel Garcia <miguelalfredo.garcia@epfl.ch>2012-08-06 11:01:17 +0200
committerMiguel Garcia <miguelalfredo.garcia@epfl.ch>2012-08-06 11:01:17 +0200
commit61cc8ff61c81a1276a921ad5288ee3bebea1c96e (patch)
tree516aabb9f5ce523ef26b0e3ac8099dd818bb314d /test
parenta05a68a9894f78fc8d7423c722e516a7ee49d559 (diff)
downloadscala-61cc8ff61c81a1276a921ad5288ee3bebea1c96e.tar.gz
scala-61cc8ff61c81a1276a921ad5288ee3bebea1c96e.tar.bz2
scala-61cc8ff61c81a1276a921ad5288ee3bebea1c96e.zip
SI-6188 ICodeReader notes exception handlers, Inliner takes them into account
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t6188.check1
-rw-r--r--test/files/run/t6188.flags1
-rw-r--r--test/files/run/t6188.scala12
3 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t6188.check b/test/files/run/t6188.check
new file mode 100644
index 0000000000..1af3932ecd
--- /dev/null
+++ b/test/files/run/t6188.check
@@ -0,0 +1 @@
+Failure(java.lang.Exception: this is an exception)
diff --git a/test/files/run/t6188.flags b/test/files/run/t6188.flags
new file mode 100644
index 0000000000..0ebca3e7af
--- /dev/null
+++ b/test/files/run/t6188.flags
@@ -0,0 +1 @@
+ -optimize
diff --git a/test/files/run/t6188.scala b/test/files/run/t6188.scala
new file mode 100644
index 0000000000..48180ddf9d
--- /dev/null
+++ b/test/files/run/t6188.scala
@@ -0,0 +1,12 @@
+// SI-6188 Optimizer incorrectly removes method invocations containing throw expressions
+
+import scala.util.Success
+
+object Test {
+ def main(args: Array[String]) {
+ val e = new Exception("this is an exception")
+ val res = Success(1).flatMap[Int](x => throw e)
+ println(res)
+ }
+}
+