diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-30 17:22:01 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-30 18:20:49 +0100 |
commit | f0c2a901ad1cafe08deff2d715b1fa8d663812a3 (patch) | |
tree | a182a95b9017fe1f8c6c80ce20befc835e93d25b /src/dotty/tools/dotc/typer/Typer.scala | |
parent | edfb6e72076b216c4762b52a5b9558fd9d106148 (diff) | |
download | dotty-f0c2a901ad1cafe08deff2d715b1fa8d663812a3.tar.gz dotty-f0c2a901ad1cafe08deff2d715b1fa8d663812a3.tar.bz2 dotty-f0c2a901ad1cafe08deff2d715b1fa8d663812a3.zip |
Fix #879
Don't insert a constructor call when typechecking Java classes.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |