Given type erasure, what is the most efficient and elegant way to solve the following overloading definition:
trait Signal
trait Step[T] {
def ar(implicit ev: T <:< Boolean): Signal
def ar(implicit ev: T <:< Float ): Signal
}
without using different names for Boolean
and Float
parametrisation? Ideally it would be T <:< Boolean union Float
but that does not exist... Can I do without an extra implicit indirection?