Skip to content

Missing kind checks when overriding a type #2770

@smarter

Description

@smarter
trait A { type L }
trait B extends A { type L[X] }

In scalac this fails with:

 error: The kind of type L does not conform to the expected kind of type L in trait A.
B.this.L's type parameters do not match type L's expected parameters:
type L (in trait B) has one type parameter, but type L (in trait A) has none
trait B extends A { type L[X] }
                         ^

but it succeeds in dotty, which probably leads to interesting issues.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions