1

Can you please explain the type T in this method definition? This is from gatling. I know that colon is for context bound values. here I see them nested. What is # for?

implicit def stringToExpression[T: TypeCaster: Types[NonValidable]#DoesNotContain: ClassTag](string: String): Expression[T] = string.el
mert inan
  • 1,537
  • 2
  • 15
  • 26

1 Answers1

1

The following method signature is translated to:

implicit def stringToExpression(string: String)(implicit t: TyperCaster[T], nv: Types[NonValidable]#DoesNotContain[T], ct: ClassTag[T]) = string.el

# in this context is a Type Projection used to refer to the inner DoesNotContain[T] class.

Yuval Itzchakov
  • 146,575
  • 32
  • 257
  • 321