when defining a type hierarchy of case classes in scala:
sealed trait FooBar {
def A:Int
def B:Int
def C:Int
}
// works
final case class Bar(A:Int, B:Int, C:Int)extends FooBar
// fails
final case class Bar extends FooBar(A:Int, B:Int, C:Int)
// fails
final case class Foo extends FooBar
how can I avoid to specify the already inherited parameters when defining an inherited type? Is this possible without any macros: Scala case classes and constructors
Would an abstract class be better suited for this purpose?