Here is an example:
sealed trait Type object Type { case object Type1 extends Type case object Type2 extends Type } sealed trait TypedTrait { typ