From a90d1f01d603d9f00445ead48a87a051cd0ede15 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 31 May 2013 23:49:52 +0200 Subject: SI-6574 Support @tailrec for extension methods. Currently, when the body of an extension method is transplanted to the companion object, recursive calls point back to the original instance method. That changes during erasure, but this is too late for tail call analysis/elimination. This commit eagerly updates the recursive calls to point to the extension method in the companion. It also removes the @tailrec annotation from the original method. --- test/files/run/t6574b.check | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/files/run/t6574b.check (limited to 'test/files/run/t6574b.check') diff --git a/test/files/run/t6574b.check b/test/files/run/t6574b.check new file mode 100644 index 0000000000..e10fa4f810 --- /dev/null +++ b/test/files/run/t6574b.check @@ -0,0 +1 @@ +List(5, 4, 3, 2, 1) -- cgit v1.2.3