Inferencing

Companion
object
class Object
trait Matchable
class Any
class Typer
class ReTyper
class Typer
class Checker

Value members

Concrete methods

def interpolateTypeVars(tree: Tree, pt: Type, locked: TypeVars)(using Context): tree

Interpolate undetermined type variables in the widened type of this tree.

Interpolate undetermined type variables in the widened type of this tree.

Value Params
locked

the set of type variables of the current typer state that cannot be interpolated at the present time Eligible for interpolation are all type variables owned by the current typerstate that are not in locked. Type variables occurring co- (respectively, contra-) variantly in the type are minimized (respectvely, maximized). Non occurring type variables are minimized if they have a lower bound different from Nothing, maximized otherwise. Type variables appearing non-variantly in the type are left untouched. Note that even type variables that do not appear directly in a type, can occur with some variance in the type, because of the constraints. E.g if X occurs co-variantly in T and we have a constraint Y <: X Then Y also occurs co-variantly in T because it needs to be minimized in order to constrain T the least. See variances for more detail.

pt

the expected result type

tree

the tree whose type is interpolated