summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJosh Suereth <Joshua.Suereth@gmail.com>2012-08-06 13:31:32 -0700
committerJosh Suereth <Joshua.Suereth@gmail.com>2012-08-06 13:31:32 -0700
commitf5b9ef4cd76d2c6ebf311bcee573fd43fc880326 (patch)
tree7bfe26021baaa7ad7e0765fff298c82e0c13798e /test/files/run
parentb531f9577f5be47f99b0be0d6b9d586668e9ae69 (diff)
parent17037367049312eb3d26766a5759295ac9f8aed6 (diff)
downloadscala-f5b9ef4cd76d2c6ebf311bcee573fd43fc880326.tar.gz
scala-f5b9ef4cd76d2c6ebf311bcee573fd43fc880326.tar.bz2
scala-f5b9ef4cd76d2c6ebf311bcee573fd43fc880326.zip
Merge pull request #1059 from magarciaEPFL/ticket-SI-6188
SI-6188
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/private-inline.scala2
-rw-r--r--test/files/run/t6188.check1
-rw-r--r--test/files/run/t6188.flags1
-rw-r--r--test/files/run/t6188.scala12
4 files changed, 15 insertions, 1 deletions
diff --git a/test/files/run/private-inline.scala b/test/files/run/private-inline.scala
index a45300b026..a62007779c 100644
--- a/test/files/run/private-inline.scala
+++ b/test/files/run/private-inline.scala
@@ -30,7 +30,7 @@ final class A {
}
object Test {
- def methodClasses = List("f1a", "f1b", "f2a", "f2b") map ("A$$anonfun$" + _ + "$1")
+ def methodClasses = List("f1a", "f2a") map ("A$$anonfun$" + _ + "$1")
def main(args: Array[String]): Unit = {
val a = new A
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)
+ }
+}
+