Say I do the following:
trait A {
val i: Int
override def toString = s"A($i)"
}
case class B(i: Int, j: Int) extends A
println(B(2, 3))
This will give me the output:
A(2)
Is there a way I can make B.toString revert to the default toString for a case class without me having to explicitly write:
override def toString = s"B($i,$j)"