case class
SingletonOf[T, U <: AnyRef { ... /* 2 definitions in type refinement */ }](widen: T { ... /* 2 definitions in type refinement */ }) extends Product with Serializable
Instance Constructors
-
new
SingletonOf(widen: T { ... /* 2 definitions in type refinement */ })
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
val
widen: T { ... /* 2 definitions in type refinement */ }
This is a workaround that allows us to approximate multiple implicit parameter sections (which Scala does not currently support). See this gist by Miles Sabin for the original context:
https://gist.github.com/milessabin/cadd73b7756fe4097ca0
The key idea is that we can use an intermediate type to capture the type members of the two
Unapply
instances in such a way that we can refer to them in the implicit parameter list.