Skip to content

Commit

Permalink
Merge pull request scala#890 from dotty-staging/fix-#879
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkDimius committed Oct 31, 2015
2 parents ac34748 + 125831b commit cdfcbc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
11 changes: 11 additions & 0 deletions tests/pos/java-interop/i879.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Foo {
Foo(int i) {
}
}


class Bar extends Foo {
Bar() {
super(10);
}
}

0 comments on commit cdfcbc1

Please sign in to comment.