summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-10-22 22:11:22 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-10-22 22:11:22 +0200
commitff3e57beddfec9678b5be1c6031a45e483e1dd66 (patch)
tree3a63b900eee186c0ba9be48ab6516c29251bac50
parent3440d1bdbda4746756fa2c905aa2cc41eadbe5cf (diff)
downloadscala-ff3e57beddfec9678b5be1c6031a45e483e1dd66.tar.gz
scala-ff3e57beddfec9678b5be1c6031a45e483e1dd66.tar.bz2
scala-ff3e57beddfec9678b5be1c6031a45e483e1dd66.zip
SI-6526 Additional test case.
-rw-r--r--test/files/neg/t6526.check5
-rw-r--r--test/files/neg/t6526.scala5
2 files changed, 9 insertions, 1 deletions
diff --git a/test/files/neg/t6526.check b/test/files/neg/t6526.check
index f4db0cc87a..606c18c301 100644
--- a/test/files/neg/t6526.check
+++ b/test/files/neg/t6526.check
@@ -10,4 +10,7 @@ t6526.scala:20: error: could not optimize @tailrec annotated method inner: it co
t6526.scala:30: error: could not optimize @tailrec annotated method inner: it contains a recursive call not in tail position
@tailrec def inner(i: Int): Int = 1 + inner(i)
^
-four errors found
+t6526.scala:39: error: could not optimize @tailrec annotated method inner: it contains a recursive call not in tail position
+ def inner(i: Int): Int = 1 + inner(i)
+ ^
+5 errors found
diff --git a/test/files/neg/t6526.scala b/test/files/neg/t6526.scala
index a34ba570d0..0bc249aa98 100644
--- a/test/files/neg/t6526.scala
+++ b/test/files/neg/t6526.scala
@@ -33,4 +33,9 @@ class TailRec {
}.foo
}
}
+
+ Some(new AnyRef) map { phooie =>
+ @tailrec
+ def inner(i: Int): Int = 1 + inner(i)
+ } getOrElse 42
}