scala.tools.nsc.typechecker.Contexts
Return the closest enclosing context that defines a subclass of clazz
or a companion object thereof, or NoContext
if no such context exists.
Return closest enclosing context that defines a superclass of clazz
, or a
companion module of a superclass of clazz
, or NoContext if none exists
Is sym
accessible as a member of tree site
with type
pre
in current context?
Fast path for some slow checks (ambiguous assignment in Refchecks, and existence of match for MatchTranslation in virtpatmat.) This logic probably needs improvement.
Is sub
a subclass of base
or a companion object of such a subclass?
Find a symbol in this context or one of its outers.
Find a symbol in this context or one of its outers.
Used to find symbols are owned by methods (or fields), they can't be found in some scope.
Examples: companion module of classes owned by a method, default getter methods of nested methods. See NamesDefaults.scala
A context for typing constructor parameter ValDefs, super or self invocation arguments and default getters of constructors.
A context for typing constructor parameter ValDefs, super or self invocation arguments and default getters of constructors. These expressions need to be type checked in a scope outside the class, cf. spec 5.3.1.
This method is called by namer / typer where this
is the context for the constructor DefDef. The
owner of the resulting (new) context is the outer context for the Template, i.e. the context for the
ClassDef. This means that class type parameters will be in scope. The value parameters of the current
constructor are also entered into the new constructor scope. Members of the class however will not be
accessible.
(context: StringAdd).self
(context: StringFormat).self
(context: ArrowAssoc[Analyzer.Context]).x
(Since version 2.10.0) Use leftOfArrow
instead
(context: Ensuring[Analyzer.Context]).x
(Since version 2.10.0) Use resultOfEnsuring
instead