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 the closest enclosing context that defines a subclass of clazz
or a companion object thereof, or NoContext
if no such context exists.
The symbol with name name
imported via the import in imp
,
if any such symbol is accessible from this context.
The symbol with name name
imported via the import in imp
,
if any such symbol is accessible from this context.
Is sym
accessible as a member of pre
in current context?
Is sym
accessible as a member of pre
in current context?
Is sym
defined in package object of package pkg
?
Since sym may be defined in some parent of the package object,
we cannot inspect its owner only; we have to go through the
info of the package object.
Is sym
defined in package object of package pkg
?
Since sym may be defined in some parent of the package object,
we cannot inspect its owner only; we have to go through the
info of the package object. However to avoid cycles we'll check
what other ways we can before pushing that way.
Is sub
a subclass of base
or a companion object of such a subclass?
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
Find the symbol of a simple name starting from this context.
Find the symbol of a simple name starting from this context. All names are filtered through the "qualifies" predicate, the search continuing as long as no qualifying name is found.
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.