The following code will yield a compile error saying "case-to-case inheritance is prohibited".
case class BaseEvent(eventType: String, payload: Map[String, Any] = Map())
case class ChildEvent(payload: Map[String, Any] = Map()) extends BaseEvent("ChildEventType", payload)
I understand I can change BaseEvent to a normal class or a trait to get it compile. But I'd still like to understand why Scala doesn't allow case-to-case inheritance.