Let us assume we have the two following classes:
abstract case class MyParent(param: Int) {
// ...
}
case class MyChild(param: Int) extends MyParent(param: Int) {
// ... ^^^^^ ^^^^^
}
Making them both case classes resulted in an error in both param usage places, which says that it needs the override modifier that will override the value from the parent class. This looks strange to me.. why do I have to invent other param names here.. why is this order of things enforced? Where is the profit?
You never should derive a case class from another case class!
Try this in a REPL started with scala -deprecation: