summaryrefslogtreecommitdiff
path: root/test/files/neg/tailrec-2.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-07-02 04:20:44 +0000
committerPaul Phillips <paulp@improving.org>2010-07-02 04:20:44 +0000
commitfbc453397552983a2c2a229cca8f7c13a641b9c7 (patch)
treeed5101b5693e52f7e8160e3bc7b38ed70ddf3892 /test/files/neg/tailrec-2.check
parent58adc8d999687d1cfa6394d7f4201dfaf411ccfe (diff)
downloadscala-fbc453397552983a2c2a229cca8f7c13a641b9c7.tar.gz
scala-fbc453397552983a2c2a229cca8f7c13a641b9c7.tar.bz2
scala-fbc453397552983a2c2a229cca8f7c13a641b9c7.zip
Some more improvement on the error messages whe...
Some more improvement on the error messages when @tailrec fails. Now it gives a sensible message if the recursive target is actually a supertype of this, rather than saying the call is not in tail position. No review.
Diffstat (limited to 'test/files/neg/tailrec-2.check')
-rw-r--r--test/files/neg/tailrec-2.check4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/neg/tailrec-2.check b/test/files/neg/tailrec-2.check
new file mode 100644
index 0000000000..ab6733946d
--- /dev/null
+++ b/test/files/neg/tailrec-2.check
@@ -0,0 +1,4 @@
+tailrec-2.scala:6: error: could not optimize @tailrec annotated method: it contains a recursive call targetting a supertype
+ @annotation.tailrec final def f[B >: A](mem: List[B]): List[B] = (null: Super[A]).f(mem)
+ ^
+one error found