ImplicitRunInfo
trait ImplicitRunInfo
Info relating to implicits that is kept for one run
Value members
Concrete methods
The implicit scope of a type tp, which is specified by the following definitions.
The implicit scope of a type tp, which is specified by the following definitions.
A reference is an anchor if it refers to an object, a class, a trait, an abstract type, an opaque type alias, or a match type alias. References to packages and package objects are anchors only under -source:3.0-migration.
The anchors of a type T is a set of references defined as follows:
- If
Tis a reference to an anchor,Titself plus, ifTis of the formP#A, the anchors ofP. - If
Tis an alias ofU, the anchors ofU. - If
Tis a reference to a type parameter, the union of the anchors of both of its bounds. - If
Tis a singleton reference, the anchors of its underlying type, plus, ifTis of the form(P#x).type, the anchors ofP. - If
Tis the this-type of a static object, the anchors of a term reference to that object. - If
Tis some other type, the union of the anchors of each constituent type ofT.
The implicit scope of a type tp is the smallest set S of term references (i.e. TermRefs)
such that
- If
Tis a reference to a class, S includes a reference to the companion object of the class, if it exists, as well as the implicit scopes of all ofT's parent classes. - If
Tis a reference to an object, S includesTitself as well as the implicit scopes of all ofT's parent classes. - If
Tis a reference to an opaque type alias namedA, S includes a reference to an objectAdefined in the same scope as the type, if it exists, as well as the implicit scope ofT's underlying type or bounds. - If
Tis a reference to an an abstract type or match type alias namedA, S includes a reference to an objectAdefined in the same scope as the type, if it exists, as well as the implicit scopes ofT's lower and upper bound, if present. - If
Tis a reference to an anchor of the formp.Athen S also includes all term references on the pathp. - If
Tis some other type, S includes the implicit scopes of all anchors ofT.