how to find the implicit function or variables in scala

Viewed 190

I can't find the implicit conversions or implicit argument values being used in Scala code. This makes reading open source projects very confusing.

The implicitly trick can only help to check if there is a valid implicit variable of some type, but couldn't tell where the implicit variable was defined.

scala> implicitly[(Int) => RichInt]
res2: Int => scala.runtime.RichInt = <function1>

Is there an easy way to find the definitions of the implicit conversions and values being used by a piece of code? If the source code file is very long, it will be a huge work.

2 Answers
Related