From f0c2a901ad1cafe08deff2d715b1fa8d663812a3 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 30 Oct 2015 17:22:01 +0100 Subject: Fix #879 Don't insert a constructor call when typechecking Java classes. --- src/dotty/tools/dotc/typer/Typer.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer/Typer.scala') diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 3ca728895..569e4f7d5 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 } -- cgit v1.2.3