The error can be reproduced in the console with the following code.
case class SomeClass(name: String)
abstract class Factory() {
protected def create[U](name: String) : U
}
class SomeFactory extends Factory() {
override def create[SomeClass](name: String) = SomeClass(name)
}
<console>:11: error: type mismatch;
found : SomeClass(in object $iw) required: SomeClass(in method create) override def create[SomeClass](name: String) = SomeClass(name)
Seems like this is what you're trying to achieve:
(I'm assuming you meant for
SomeFactory
to extendFactory
)