The view means that type A can be “viewed” as type B , given by the implicit function A => B So yes, both implicit arguments in addIt and addIt2 are representations.
addIt2 returns 123123 , because (unfortunately) you can call + on two objects, where one of them is String . Before Scala considers applying the str2int transform. If you do not want this, you can explicitly apply the view:
def addIt2(x: String)(implicit str2int: String => Int) = 123 + str2int(x)
Or you can hide the any2stringadd conversion:
object Container { import Predef.{any2stringadd => _} def addIt2(x: String)(implicit str2int: String => Int) = 123 + x }
source share