-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:desugarDesugaring happens after parsing but before typing, see desugar.scalaDesugaring happens after parsing but before typing, see desugar.scalaitype:bug
Milestone
Description
Compiler version
Tested with 3.2.1 and 3.3.1
Minimized code
trait A
trait B extends A
trait M[+T]
case class MA(id:Int) extends M[A]
class MB(id:Int) extends MA(id) with M[B]
Output
illegal inheritance: class MB inherits conflicting instances of non-variant base trait M.
Direct basetype: M[Playground.B]
Basetype via case class MA: M[A]
Expectation
Compiles, or meaningful error message. If MA
is not a case class, the code compiles. The base trait M
is not non-variant.
Metadata
Metadata
Assignees
Labels
SpreeSuitable for a future SpreeSuitable for a future Spreearea:desugarDesugaring happens after parsing but before typing, see desugar.scalaDesugaring happens after parsing but before typing, see desugar.scalaitype:bug