score:0

Accepted answer

If CodeTree is not a case class you need to create a companion object with apply and unapply methods. With a case class you get those methods for free in the background and they are necessary for pattern matching.


Related Query

More Query from same tag