You can use Nothing as in:
case object ImplicitMessage extends Message[Nothing]
Nothing is a special type that is a subtype of all possible types and has no instances.
If you have problems with deviations due to Message[T] , you can use the following trick:
object ImplicitMessage extends Message[Nothing] { def apply[T]: Message[T] = this.asInstanceOf[Message[T]] } scala> ImplicitMessage[String] res1: Message[String] = ImplicitMessage$@4ddf95b5 scala> ImplicitMessage[Long] res2: Message[Long] = ImplicitMessage$@4ddf95b5
source share