scala implicit (4)

implicit lookup

Implicit value resolution rules are complex. A lot of posts write about that. See stackoverflow and this one. In short, it lies in 2 category:

  1. implicit value in the current scope of the call site, such as local implicit parameter and imports.
  2. implicit values in the implicit scope of type T.  T consists of source type, dest type, type parameter, etc. The 3 types are most common one. Implicit scope is the companion object of the type.