Skip to content

Commit 1fe1232

Browse files
committed
Reallow ill-kinded but JavaDefined parents (scala#5010)
To allow again t3613 to compile I need this exception. But the testcase is so old I'm not sure if we should do this, even tho it's still supported by Scalac.
1 parent 4c92bf1 commit 1fe1232

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,8 @@ class Typer extends Namer
15241524
ctx.error(i"$psym is extended twice", tree.pos)
15251525
seenParents += psym
15261526
if (tree.isType) {
1527-
checkSimpleKinded(result) // Not needed for constructor calls, as type arguments will be inferred.
1527+
if (!psym.is(JavaDefined))
1528+
checkSimpleKinded(result) // Not needed for constructor calls, as type arguments will be inferred.
15281529
if (psym.is(Trait) && !cls.is(Trait) && !cls.superClass.isSubClass(psym))
15291530
result = maybeCall(result, psym, psym.primaryConstructor.info)
15301531
}

0 commit comments

Comments
 (0)