diff options
Diffstat (limited to 'test/files/neg/t6443c.scala')
-rw-r--r-- | test/files/neg/t6443c.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/t6443c.scala b/test/files/neg/t6443c.scala new file mode 100644 index 0000000000..817224e043 --- /dev/null +++ b/test/files/neg/t6443c.scala @@ -0,0 +1,21 @@ +trait A { + type D >: Null <: C + def foo(d: D)(a: Any, d2: d.type): Unit + trait C { + def bar: Unit = foo(null)(null, null) + } +} +object B extends A { + class D extends C + + def foo(d: D)(a: Any, d2: d.type): Unit = () // Bridge method required here! + + // No bridge method should be added, but we'll be happy enough if + // the "same type after erasure" error kicks in before the duplicated + // bridge causes a problem. + def foo(d: D)(a: Any)(d2: d.type): Unit = () +} + +object Test extends App { + new B.D().bar +} |