We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac34748 + 125831b commit cdfcbc1Copy full SHA for cdfcbc1
src/dotty/tools/dotc/typer/Typer.scala
@@ -1027,7 +1027,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1027
*/
1028
def ensureConstrCall(cls: ClassSymbol, parents: List[Tree])(implicit ctx: Context): List[Tree] = {
1029
val firstParent :: otherParents = parents
1030
- if (firstParent.isType && !(cls is Trait))
+ if (firstParent.isType && !(cls is Trait) && !cls.is(JavaDefined))
1031
typed(untpd.New(untpd.TypedSplice(firstParent), Nil)) :: otherParents
1032
else parents
1033
}
tests/pos/java-interop/i879.java
@@ -0,0 +1,11 @@
1
+class Foo {
2
+ Foo(int i) {
3
+ }
4
+}
5
+
6
7
+class Bar extends Foo {
8
+ Bar() {
9
+ super(10);
10
11
0 commit comments