If you call, for example, createEntities[Parent]("A", "B")(which you can, because it Parentis a subtype Parent), it needs an implicit one mutable.Map[String, Parent], and it is not. To be more precise, your definitions require you to specify mutable.Map[String, T]for each subtype Parent, and not just for those already defined:
implicit def aMap[T <: Parent]: mutable.Map[String, T] = ...
source
share