ContextOps

dotty.tools.dotc.core.ContextOps
object ContextOps

Extension methods for contexts where we want to keep the ctx. syntax

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ContextOps.type

Members list

Extensions

Extensions

extension (ctx: Context)

Context where sym is defined, assuming we are in a nested context.

Context where sym is defined, assuming we are in a nested context.

Attributes

def denotNamed(name: Name, required: FlagSet, excluded: FlagSet): Denotation

The denotation with the given name and all required flags in current context

The denotation with the given name and all required flags in current context

Attributes

def enter(sym: Symbol): Symbol

Enter symbol into current class, if current class is owner of current context, or into current scope, if not. Should always be called instead of scope.enter in order to make sure that updates to class members are reflected in finger prints.

Enter symbol into current class, if current class is owner of current context, or into current scope, if not. Should always be called instead of scope.enter in order to make sure that updates to class members are reflected in finger prints.

Attributes

A new context for the interior of a class

A new context for the interior of a class

Attributes

final def javaFindMember(name: Name, pre: Type, lookInCompanion: Boolean, required: FlagSet, excluded: FlagSet): Denotation

Look in the prefix with Java semantics.

Look in the prefix with Java semantics.

Value parameters

lookInCompanion

If true, try in the companion class of a module as a fallback. Note: originally this was used to type Select nodes in Java code, but that is no longer the case. It is preserved in case it is necessary for denotNamed, but this is unverified.

Attributes

def localContext(tree: Tree, owner: Symbol): FreshContext

A fresh local context with given tree and owner.

A fresh local context with given tree and owner.

#19019 Self valdefs must always keep their enclosing ctx.owner. They can be NoSymbol or having a symbol with the SelfName flag, depending on whether they have an explicit name or not. In either case, we avoid setOwner.

The owner might also not exist for other kinds of trees, such as LambdaTypeTree and TermLambdaTypeTree. In these cases, we also keep the enclosing owner.

Attributes