summaryrefslogtreecommitdiff
path: root/test/files/run/t6188.scala
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/files/run/t6188.scala
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/files/run/t6188.scala')
-rw-r--r--test/files/run/t6188.scala12
1 files changed, 12 insertions, 0 deletions
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)
+ }
+}
+