diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t6526.check | 5 | ||||
-rw-r--r-- | test/files/neg/t6526.scala | 5 |
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 } |