diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 3ca728895da1..569e4f7d53f7 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1027,7 +1027,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit */ def ensureConstrCall(cls: ClassSymbol, parents: List[Tree])(implicit ctx: Context): List[Tree] = { val firstParent :: otherParents = parents - if (firstParent.isType && !(cls is Trait)) + if (firstParent.isType && !(cls is Trait) && !cls.is(JavaDefined)) typed(untpd.New(untpd.TypedSplice(firstParent), Nil)) :: otherParents else parents } diff --git a/tests/pos/java-interop/i879.java b/tests/pos/java-interop/i879.java new file mode 100644 index 000000000000..6db5b77ff20f --- /dev/null +++ b/tests/pos/java-interop/i879.java @@ -0,0 +1,11 @@ +class Foo { + Foo(int i) { + } +} + + +class Bar extends Foo { + Bar() { + super(10); + } +} \ No newline at end of file