I have the following:
scala> trait Tail
scala> case class Cat(name: String)
scala> val aa = new Cat(name = "bob")
val aa: Cat with Tail = Cat(ben)
scala> val bb = aa.copy(name = "ted")
val bb: Cat = Cat(ted)
Why is it that bb
didn't inherited the Tail
trait?
How can I copy aa
and still preserve the trait?