From fbc453397552983a2c2a229cca8f7c13a641b9c7 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 2 Jul 2010 04:20:44 +0000 Subject: 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. --- test/files/neg/tailrec-2.check | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/files/neg/tailrec-2.check (limited to 'test/files/neg/tailrec-2.check') 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 -- cgit v1.2.3