Closed
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.