Is there a way to have a case class accept types defined in a trait that it mixes in? When I try what I would do with ordinary classes, it fails:
trait myTypes{ type aType = Array[String] } abstract class ParentClass extends myTypes{ //no issue here val a:aType = Array.fill[String](7)("Hello") } //error: not found: type aType case class ChildClass(arg:aType) extends ParentClass //error: not found: type aType case class ChildClass2(arg:aType) extends myTypes Not sure why Scala would choose to behave this way, but I would appreciate some help in circumventing this annoying error.