diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-02-15 14:14:13 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-02-15 14:14:13 +0100 |
commit | 640e27950001d6eddca89654b93e042a38822557 (patch) | |
tree | c2f21f40c282d0933b5c40c8ae156c66c56d88c7 /test/files/run | |
parent | 45cfc7b3a242f0be0397c5eb3946356bf3446dc9 (diff) | |
download | scala-640e27950001d6eddca89654b93e042a38822557.tar.gz scala-640e27950001d6eddca89654b93e042a38822557.tar.bz2 scala-640e27950001d6eddca89654b93e042a38822557.zip |
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.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t3452b.check | 1 | ||||
-rw-r--r-- | test/files/run/t3452b/J_2.java | 1 | ||||
-rw-r--r-- | test/files/run/t3452b/S_1.scala | 9 |
3 files changed, 10 insertions, 1 deletions
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] |