Meaning of additional colon in Scala class parametrization

This is called a context bound. They are syntactic sugar for an implicit parameter list:

def meth[A : ContextBound1 : ContextBoundN](a: A)

// ==>

def meth[A](a: A)(implicit evidence: ContextBound1[A], ContextBoundN[A])

If there are multiple context bounds from 1 to N, they are all translated into the same parameter list. See this question for a more detailed explanation about how they work and for what they are useful.

To find such symbols it is useful to read the StackOverflow Scala Tutorial.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)