From 640e27950001d6eddca89654b93e042a38822557 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sat, 15 Feb 2014 14:14:13 +0100 Subject: SI-3452 A better fix for static forwarder generic sigs The previous commit fixed this in the wrong way. The addition to the test case (testing an inherited method from a base class in addition to the test with a mxin method) still failed. Like mixin, static forwarder generation uses the exact erased siganture of the forwardee for the forwarder. It really ought to use the as-seen-from signature (adding requisite boxing/ unboxing), but until we do that we have to avoid emitting generic signatures that are incoherent. --- test/files/run/t3452b.check | 1 + test/files/run/t3452b/J_2.java | 1 + test/files/run/t3452b/S_1.scala | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'test/files') diff --git a/test/files/run/t3452b.check b/test/files/run/t3452b.check index 4f9ed634b4..204c3d0437 100644 --- a/test/files/run/t3452b.check +++ b/test/files/run/t3452b.check @@ -1 +1,2 @@ Search received: test +SearchC received: test diff --git a/test/files/run/t3452b/J_2.java b/test/files/run/t3452b/J_2.java index 24c27b88bd..839f334508 100644 --- a/test/files/run/t3452b/J_2.java +++ b/test/files/run/t3452b/J_2.java @@ -1,5 +1,6 @@ public class J_2 { public static void j() { StringSearch.search("test"); + StringSearch.searchC("test"); } } diff --git a/test/files/run/t3452b/S_1.scala b/test/files/run/t3452b/S_1.scala index 3ab19ed031..a209f12035 100644 --- a/test/files/run/t3452b/S_1.scala +++ b/test/files/run/t3452b/S_1.scala @@ -5,6 +5,13 @@ trait Search[M] { } } -object StringSearch extends Search[String] +class SearchC[M] { + def searchC(input: M): C[Int] = { + println("SearchC received: " + input) + null + } +} + +object StringSearch extends SearchC[String] with Search[String] trait C[T] -- cgit v1.2.3