Skip to content

Typer fixes #5017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@ class Typer extends Namer
ctx.error(i"$psym is extended twice", tree.pos)
seenParents += psym
if (tree.isType) {
checkSimpleKinded(result) // Not needed for constructor calls, as type arguments will be inferred.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will they be inferred? I'm unconvinced that

class Siz[T](i: Int)
class Zle extends Siz(1)

and

class Siz[T]
class Zle extends Siz

should be treated differently w/r/t superclass targs.

if (psym.is(Trait) && !cls.is(Trait) && !cls.superClass.isSubClass(psym))
result = maybeCall(result, psym, psym.primaryConstructor.info)
}
Expand Down
1 change: 1 addition & 0 deletions tests/neg/i5010.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class i0 extends Function0 // error