Skip to content

Commit 7df83bc

Browse files
committed
Test the interaction of mixin forwarders and overloads
Not only does this test still pass now that mixin forwarders are emitted as bridge: it used to cause an ambiguous overload error on ecj and now works correctly.
1 parent 162647c commit 7df83bc

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Foo(0)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
case class Foo(x: Int)
2+
3+
trait A[X] {
4+
def concat[Dummy](suffix: Int): Dummy = ???
5+
}
6+
7+
class Bar extends A[Foo] {
8+
def concat(suffix: Int): Foo = Foo(0)
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class Test {
2+
public static void main(String[] args) {
3+
Bar bar = new Bar();
4+
Foo x = bar.concat(0);
5+
System.out.println(x);
6+
}
7+
}

0 commit comments

Comments
 (0)