Skip to content

Commit ca4481a

Browse files
committed
Fix scala#5010: check type parents have type arguments
1 parent d30429f commit ca4481a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,7 @@ class Typer extends Namer
15291529
ctx.error(i"$psym is extended twice", tree.pos)
15301530
seenParents += psym
15311531
if (tree.isType) {
1532+
checkSimpleKinded(result) // Not needed for constructor calls, as type arguments will be inferred.
15321533
if (psym.is(Trait) && !cls.is(Trait) && !cls.superClass.isSubClass(psym))
15331534
result = maybeCall(result, psym, psym.primaryConstructor.info)
15341535
}

tests/neg/i5010.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class i0 extends Function0 // error

0 commit comments

Comments
 (0)