I try
trait Foo[A] {
def copy(int: Int): A
}
case class Bar(int: Int) extends Foo[Bar]
but I get
error: class Bar needs to be abstract, since method copy in trait Foo of type (int: Int)this.Bar is not defined
Since Bar is a case class, it automatically defines a copy method with exactly this signature.
Why doesn't the Foo class satisfy the interface defined by the trait Bar?