summaryrefslogtreecommitdiff
path: root/test/files/run/t6188.scala
diff options
context:
space:
mode:
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)
+ }
+}
+