PackageClassDenotation

dotty.tools.dotc.core.SymDenotations$.PackageClassDenotation

The denotation of a package class. It overrides ClassDenotation to take account of package objects when looking for members

Attributes

Graph
Supertypes
class Denotation
trait Showable
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

Attributes

Inherited from:
SingleDenotation

A cache from types T to baseType(T, C)

A cache from types T to baseType(T, C)

Attributes

Inherited from:
ClassDenotation

Value members

Concrete methods

override def computeMembersNamed(name: Name)(using Context): PreDenotation

Looks in both the package object and the package for members. The precise algorithm is as follows:

Looks in both the package object and the package for members. The precise algorithm is as follows:

If this is the scala package look in the package first, and if nothing is found there, look in the package object second. Otherwise, look in the both the package object and the package and form a union of the results.

The reason for the special treatment of the scala package is that if we complete it too early, we freeze its superclass Any, so that no members can be entered in it. As a consequence, there should be no entry in the scala package object that hides a class or object in the scala package of the same name, because the behavior would then be unintuitive for such members.

Attributes

Definition Classes
override def memberNames(keepOnly: NameFilter)(implicit onBehalf: MemberNames, ctx: Context): Set[Name]

The union of the member names of the package and the package object

The union of the member names of the package and the package object

Attributes

Definition Classes
def packageObjFor(sym: Symbol)(using Context): Symbol

The package object (as a term symbol) in this package that might contain sym as a member.

The package object (as a term symbol) in this package that might contain sym as a member.

Attributes

The package objects in this class

The package objects in this class

Attributes

override def proceedWithEnter(sym: Symbol, mscope: MutableScope)(using Context): Boolean

If another symbol with the same name is entered, unlink it. If symbol is a package object, invalidate the packageObj cache.

If another symbol with the same name is entered, unlink it. If symbol is a package object, invalidate the packageObj cache.

Attributes

Returns

sym is not already entered

Definition Classes

Unlink all package members defined in file in a previous run.

Unlink all package members defined in file in a previous run.

Attributes

Inherited methods

final def accessBoundary(base: Symbol)(using Context): Symbol

The class or term symbol up to which this symbol is accessible, or RootClass if it is public. As java protected statics are otherwise completely inaccessible in scala, they are treated as public.

The class or term symbol up to which this symbol is accessible, or RootClass if it is public. As java protected statics are otherwise completely inaccessible in scala, they are treated as public.

Value parameters

base

The access boundary to assume if this symbol is protected

Attributes

Inherited from:
SymDenotation

The field accessed by this getter or setter, or if it does not exist, the getter

The field accessed by this getter or setter, or if it does not exist, the getter

Attributes

Inherited from:
SymDenotation
def accessibleFrom(pre: Type, superAccess: Boolean)(using Context): Denotation

The denotation made up from the alternatives of this denotation that are accessible from prefix pre, or NoDenotation if no accessible alternative exists.

The denotation made up from the alternatives of this denotation that are accessible from prefix pre, or NoDenotation if no accessible alternative exists.

Attributes

Inherited from:
SingleDenotation
final def addAnnotation(cls: ClassSymbol)(using Context): Unit

Add the given annotation without parameters to the annotations of this denotation

Add the given annotation without parameters to the annotations of this denotation

Attributes

Inherited from:
SymDenotation
final def addAnnotation(annot: Annotation): Unit

Add given annotation to the annotations of this denotation

Add given annotation to the annotations of this denotation

Attributes

Inherited from:
SymDenotation
final def addAnnotations(annots: IterableOnce[Annotation])(using Context): Unit

Add all given annotations to this symbol

Add all given annotations to this symbol

Attributes

Inherited from:
SymDenotation
def aggregate[T](f: SingleDenotation => T, g: (T, T) => T): T

Map f over all single denotations and aggregate the results with g.

Map f over all single denotations and aggregate the results with g.

Attributes

Inherited from:
SingleDenotation

All symbols overridden by this denotation.

All symbols overridden by this denotation.

Attributes

Inherited from:
SymDenotation

The set of alternative single-denotations making up this denotation

The set of alternative single-denotations making up this denotation

Attributes

Inherited from:
Denotation

The alternatives of this denotation that satisfy the predicate p.

The alternatives of this denotation that satisfy the predicate p.

Attributes

Inherited from:
SingleDenotation
final def annotations(using Context): List[Annotation]

The annotations of this denotation

The annotations of this denotation

Attributes

Inherited from:
SymDenotation
def annotationsCarrying(meta: Set[Symbol], orNoneOf: Set[Symbol])(using Context): List[Annotation]

Attributes

Inherited from:
SymDenotation

The annotations without ensuring that the symbol is completed. Used for diagnostics where we don't want to force symbols.

The annotations without ensuring that the symbol is completed. Used for diagnostics where we don't want to force symbols.

Attributes

Inherited from:
SymDenotation
final def annotations_=(annots: List[Annotation]): Unit

Update the annotations of this denotation

Update the annotations of this denotation

Attributes

Inherited from:
SymDenotation
override def appliedRef(using Context): Type

The typeRef applied to its own type parameters

The typeRef applied to its own type parameters

Attributes

Definition Classes
Inherited from:
ClassDenotation

Cast to class denotation

Cast to class denotation

Attributes

Inherited from:
SymDenotation

The denotation with info(s) as seen from prefix type

The denotation with info(s) as seen from prefix type

Attributes

Inherited from:
PreDenotation

Attributes

Inherited from:
Denotation

Attributes

Inherited from:
Denotation

Attributes

Inherited from:
SymDenotation
def atSignature(sig: Signature, targetName: Name, site: Type, relaxed: Boolean)(using Context): SingleDenotation

Resolve overloaded denotation to pick the ones with the given signature when seen from prefix site.

Resolve overloaded denotation to pick the ones with the given signature when seen from prefix site.

Value parameters

relaxed

When true, consider only parameter signatures for a match.

Attributes

Inherited from:
SingleDenotation
def baseClasses(implicit onBehalf: BaseData, ctx: Context): List[ClassSymbol]

The base classes of this class in linearization order, with the class itself as first element.

The base classes of this class in linearization order, with the class itself as first element.

Attributes

Inherited from:
ClassDenotation

Like baseClasses.length but more efficient.

Like baseClasses.length but more efficient.

Attributes

Inherited from:
ClassDenotation
final def baseTypeOf(tp: Type)(using Context): Type

Compute tp.baseType(this)

Compute tp.baseType(this)

Attributes

Inherited from:
ClassDenotation

The fully qualified name on the JVM of the class corresponding to this symbol.

The fully qualified name on the JVM of the class corresponding to this symbol.

Attributes

Inherited from:
SymDenotation

If false, this symbol cannot possibly participate in an override, either as overrider or overridee.

If false, this symbol cannot possibly participate in an override, either as overrider or overridee.

Attributes

Inherited from:
SymDenotation

If this is a SingleDenotation, return it, otherwise throw a TypeError

If this is a SingleDenotation, return it, otherwise throw a TypeError

Attributes

Inherited from:
Denotation
def children(using Context): List[Symbol]

If this is a sealed class, its known children in the order of textual occurrence

If this is a sealed class, its known children in the order of textual occurrence

Attributes

Inherited from:
SymDenotation

The info asserted to have type ClassInfo

The info asserted to have type ClassInfo

Attributes

Inherited from:
ClassDenotation

The symbol asserted to have type ClassSymbol

The symbol asserted to have type ClassSymbol

Attributes

Inherited from:
ClassDenotation
final def companionClass(using Context): Symbol

The class with the same (type-) name as this module or module class, and which is also defined in the same scope and compilation unit. NoSymbol if this class does not exist.

The class with the same (type-) name as this module or module class, and which is also defined in the same scope and compilation unit. NoSymbol if this class does not exist.

Attributes

Inherited from:
SymDenotation
final def companionModule(using Context): Symbol

The module object with the same (term-) name as this class or module class, and which is also defined in the same scope and compilation unit. NoSymbol if this module does not exist.

The module object with the same (term-) name as this class or module class, and which is also defined in the same scope and compilation unit. NoSymbol if this module does not exist.

Attributes

Inherited from:
SymDenotation
final def completeFrom(completer: LazyType)(using Context): Unit

Attributes

Inherited from:
SymDenotation
final def completeOnce()(using Context): Unit

If this denotation is not completed, run the completer. The resulting info might be another completer.

If this denotation is not completed, run the completer. The resulting info might be another completer.

Attributes

See also

ensureCompleted

Inherited from:
SymDenotation
final def completer: LazyType

The completer of this denotation. @pre: Denotation is not yet completed

The completer of this denotation. @pre: Denotation is not yet completed

Attributes

Inherited from:
SymDenotation
protected def computeAsSeenFrom(pre: Type)(using Context): SingleDenotation

Attributes

Inherited from:
SingleDenotation
def computeBaseData(implicit onBehalf: BaseData, ctx: Context): (List[ClassSymbol], BaseClassSet)

Attributes

Inherited from:
ClassDenotation
def computeMemberNames(keepOnly: NameFilter)(implicit onBehalf: MemberNames, ctx: Context): Set[Name]

Attributes

Inherited from:
ClassDenotation

Is this symbol a module that contains opaque aliases?

Is this symbol a module that contains opaque aliases?

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def containsSym(sym: Symbol): Boolean

Group contains a denotation that refers to given symbol

Group contains a denotation that refers to given symbol

Attributes

Inherited from:
Denotation

Attributes

Inherited from:
SymDenotation
override def copyCaches(from: SymDenotation, phase: Phase)(using Context): ClassDenotation.this.type

Copy mamberNames and baseData caches from given denotation, provided they are valid at given phase.

Copy mamberNames and baseData caches from given denotation, provided they are valid at given phase.

Attributes

Definition Classes
Inherited from:
ClassDenotation
final def copySymDenotation(symbol: Symbol, owner: Symbol, name: Name, initFlags: FlagSet, info: Type | Null, privateWithin: Symbol | Null, annotations: List[Annotation] | Null, rawParamss: List[List[Symbol]] | Null)(using Context): SymDenotation

Copy this denotation, overriding selective fields

Copy this denotation, overriding selective fields

Attributes

Inherited from:
SymDenotation

The period (interval of phases) for which there exists a valid denotation in this flock.

The period (interval of phases) for which there exists a valid denotation in this flock.

Attributes

Inherited from:
SingleDenotation

Produce a denotation that is valid for the given context. Usually called when !(validFor contains ctx.period) (even though this is not a precondition). If the runId of the context is the same as runId of this denotation, the right flock member is located, or, if it does not exist yet, created by invoking a transformer (@See Transformers). If the runId's differ, but this denotation is a SymDenotation and its toplevel owner class or module is still a member of its enclosing package, then the whole flock is brought forward to be valid in the new runId. Otherwise the symbol is stale, which constitutes an internal error.

Produce a denotation that is valid for the given context. Usually called when !(validFor contains ctx.period) (even though this is not a precondition). If the runId of the context is the same as runId of this denotation, the right flock member is located, or, if it does not exist yet, created by invoking a transformer (@See Transformers). If the runId's differ, but this denotation is a SymDenotation and its toplevel owner class or module is still a member of its enclosing package, then the whole flock is brought forward to be valid in the new runId. Otherwise the symbol is stale, which constitutes an internal error.

Attributes

Inherited from:
SingleDenotation

The current declaration in this symbol's class owner that has the same name as this one, and, if there are several, also has the same signature.

The current declaration in this symbol's class owner that has the same name as this one, and, if there are several, also has the same signature.

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SingleDenotation
def delete(sym: Symbol)(using Context): Unit

Delete symbol from current scope. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

Delete symbol from current scope. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

Attributes

Inherited from:
ClassDenotation
def derivedSingleDenotation(symbol: Symbol, info: Type, pre: Type, isRefinedMethod: Boolean)(using Context): SingleDenotation

Attributes

Inherited from:
SingleDenotation
final override def derivesFrom(base: Symbol)(using Context): Boolean

Is this a subclass of base, and is the denoting symbol also different from Null or Nothing?

Is this a subclass of base, and is the denoting symbol also different from Null or Nothing?

Attributes

Note

erroneous classes are assumed to derive from all other classes and all classes derive from them.

Definition Classes
Inherited from:
ClassDenotation
inline def disambiguate(inline p: Symbol => Boolean)(using Context): SingleDenotation

If this denotation is overloaded, filter with given predicate. If result is still overloaded throw a TypeError. Note: disambiguate is slightly different from suchThat in that single-denotations that do not satisfy the predicate are left alone (whereas suchThat would map them to NoDenotation).

If this denotation is overloaded, filter with given predicate. If result is still overloaded throw a TypeError. Note: disambiguate is slightly different from suchThat in that single-denotations that do not satisfy the predicate are left alone (whereas suchThat would map them to NoDenotation).

Attributes

Inherited from:
Denotation
def effectiveName(using Context): Name

The name, except

The name, except

  • if this is a module class, strip the module class suffix
  • if this is a companion object with a clash-avoiding name, strip the "avoid clash" suffix

Attributes

Inherited from:
SymDenotation
final def effectiveOwner(using Context): Symbol

The owner, skipping package objects and non-lazy valdefs.

The owner, skipping package objects and non-lazy valdefs.

Attributes

Inherited from:
SymDenotation
final def enclosingClass(using Context): Symbol

The class containing this denotation. If this denotation is already a class, return itself Definitions flagged with JavaStatic are treated specially. Their enclosing class is not the lexically enclosing class, but in turn the enclosing class of the latter. This reflects the context created by Context#superCallContext, Context#thisCallArgContext for these definitions.

The class containing this denotation. If this denotation is already a class, return itself Definitions flagged with JavaStatic are treated specially. Their enclosing class is not the lexically enclosing class, but in turn the enclosing class of the latter. This reflects the context created by Context#superCallContext, Context#thisCallArgContext for these definitions.

Note, that as packages have ClassSymbols, top level classes will have an enclosingClass with Package flag set.

Attributes

Inherited from:
SymDenotation
final def enclosingClassNamed(name: Name)(using Context): Symbol

The class containing this denotation which has the given effective name.

The class containing this denotation which has the given effective name.

Attributes

Inherited from:
SymDenotation

The closest enclosing extension method containing this definition, including methods outside the current class.

The closest enclosing extension method containing this definition, including methods outside the current class.

Attributes

Inherited from:
SymDenotation
final def enclosingMethod(using Context): Symbol

The closest enclosing method containing this definition. A local dummy owner is mapped to the primary constructor of the class.

The closest enclosing method containing this definition. A local dummy owner is mapped to the primary constructor of the class.

Attributes

Inherited from:
SymDenotation

The package class containing this denotation

The package class containing this denotation

Attributes

Inherited from:
SymDenotation
final def enclosingSubClass(using Context): Symbol

The class that encloses the owner of the current context and that is a subclass of this class. NoSymbol if no such class exists.

The class that encloses the owner of the current context and that is a subclass of this class. NoSymbol if no such class exists.

Attributes

Inherited from:
SymDenotation
final def ensureCompleted()(using Context): Unit

Make sure this denotation is fully completed.

Make sure this denotation is fully completed.

Attributes

See also

completeOnce

Inherited from:
SymDenotation

If this class has the same decls scope reference in phase and phase.next, install a new denotation with a cloned scope in phase.next.

If this class has the same decls scope reference in phase and phase.next, install a new denotation with a cloned scope in phase.next.

Attributes

Inherited from:
ClassDenotation

If denotation is private, remove the Private flag and expand the name if necessary

If denotation is private, remove the Private flag and expand the name if necessary

Attributes

Inherited from:
SymDenotation

Make sure the type parameters of this class appear in the order given by typeParams in the scope of the class. Reorder definitions in scope if necessary.

Make sure the type parameters of this class appear in the order given by typeParams in the scope of the class. Reorder definitions in scope if necessary.

Attributes

Inherited from:
ClassDenotation
def enter(sym: Symbol, scope: Scope)(using Context): Unit

Enter a symbol in current scope, and future scopes of same denotation. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

Enter a symbol in current scope, and future scopes of same denotation. Note: We require that this does not happen after the first time someone does a findMember on a subclass.

Value parameters

scope

The scope in which symbol should be entered. If this is EmptyScope, the scope is decls.

Attributes

Inherited from:
ClassDenotation
def enterNoReplace(sym: Symbol, scope: MutableScope)(using Context): Unit

Enter a symbol in given scope without potentially replacing the old copy.

Enter a symbol in given scope without potentially replacing the old copy.

Attributes

Inherited from:
ClassDenotation

Is this denotation different from NoDenotation or an ErrorDenotation?

Is this denotation different from NoDenotation or an ErrorDenotation?

Attributes

Inherited from:
Denotation
final def expandedName(using Context): Name

The expanded name of this denotation.

The expanded name of this denotation.

Attributes

Inherited from:
SymDenotation

Returns all matching symbols defined in parents of the selftype.

Returns all matching symbols defined in parents of the selftype.

Attributes

Inherited from:
SymDenotation
final def extensionParam(using Context): Symbol

The extension parameter of this extension method

The extension parameter of this extension method

Attributes

Inherited from:
SymDenotation
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Attributes

Inherited from:
Showable
final def filterAnnotations(p: Annotation => Boolean)(using Context): Unit

Keep only those annotations that satisfy p

Keep only those annotations that satisfy p

Attributes

Inherited from:
SymDenotation

Keep only those denotations in this group which have a signature that's not already defined by denots.

Keep only those denotations in this group which have a signature that's not already defined by denots.

Attributes

Inherited from:
SingleDenotation
def filterWithFlags(required: FlagSet, excluded: FlagSet)(using Context): SingleDenotation

Keep only those denotations in this group that have all of the flags in required, but none of the flags in excluded.

Keep only those denotations in this group that have all of the flags in required, but none of the flags in excluded.

Attributes

Inherited from:
SingleDenotation

Keep only those denotations in this group which satisfy predicate p.

Keep only those denotations in this group which satisfy predicate p.

Attributes

Inherited from:
SingleDenotation
final override def findMember(name: Name, pre: Type, required: FlagSet, excluded: FlagSet)(using Context): Denotation

Find member of this denotation with given name, all required flags and no excluded flag, and produce a denotation that contains the type of the member as seen from given prefix pre.

Find member of this denotation with given name, all required flags and no excluded flag, and produce a denotation that contains the type of the member as seen from given prefix pre.

Attributes

Definition Classes
Inherited from:
ClassDenotation
final def findMemberNoShadowingBasedOnFlags(name: Name, pre: Type, required: FlagSet, excluded: FlagSet)(using Context): Denotation

Attributes

Inherited from:
ClassDenotation
final def first: SingleDenotation

First/last denotation in the group

First/last denotation in the group

Attributes

Inherited from:
SingleDenotation
final def flags(using Context): FlagSet

The flag set

The flag set

Attributes

Inherited from:
SymDenotation
final def flagsString(using Context): String

Attributes

Inherited from:
SymDenotation
final def flags_=(flags: FlagSet): Unit

Update the flag set

Update the flag set

Attributes

Inherited from:
SymDenotation
def flatName(using Context): Name

The encoded flat name of this denotation, where joined names are separated by separator characters.

The encoded flat name of this denotation, where joined names are separated by separator characters.

Attributes

Inherited from:
SymDenotation
override def fullName(using Context): Name

fullName where `.' is the separator character

fullName where `.' is the separator character

Attributes

Definition Classes
Inherited from:
ClassDenotation
final override def fullNameSeparated(kind: QualifiedNameKind)(using Context): Name

The encoded full path name of this denotation, where outer names and inner names are separated by separator strings as indicated by the given name kind. Drops package objects. Represents each term in the owner chain by a simple _$.

The encoded full path name of this denotation, where outer names and inner names are separated by separator strings as indicated by the given name kind. Drops package objects. Represents each term in the owner chain by a simple _$.

Attributes

Definition Classes
Inherited from:
ClassDenotation
def fullNameSeparated(prefixKind: QualifiedNameKind, kind: QualifiedNameKind, name: Name)(using Context): Name

The encoded full path name of this denotation (separated by prefixKind), followed by the separator implied by kind and the given name. Drops package objects. Represents each term in the owner chain by a simple _$.

The encoded full path name of this denotation (separated by prefixKind), followed by the separator implied by kind and the given name. Drops package objects. Represents each term in the owner chain by a simple _$.

Attributes

Inherited from:
SymDenotation
final def getAnnotation(cls: Symbol)(using Context): Option[Annotation]

Optionally, the annotation matching the given class symbol

Optionally, the annotation matching the given class symbol

Attributes

Inherited from:
SymDenotation
def givenSelfType(using Context): Type

The explicitly given self type (self types of modules are assumed to be explcitly given here).

The explicitly given self type (self types of modules are assumed to be explcitly given here).

Attributes

Inherited from:
ClassDenotation

Does this denotation have an alternative that satisfies the predicate p?

Does this denotation have an alternative that satisfies the predicate p?

Attributes

Inherited from:
SingleDenotation
final def hasAnnotation(cls: Symbol)(using Context): Boolean

Does this denotation have an annotation matching the given class symbol?

Does this denotation have an annotation matching the given class symbol?

Attributes

Inherited from:
SymDenotation

Does this symbol have defined or inherited default parameters? Default parameters are recognized until erasure.

Does this symbol have defined or inherited default parameters? Default parameters are recognized until erasure.

Attributes

Inherited from:
SymDenotation
def hasSkolems(tp: Type): Boolean

Attributes

Inherited from:
SymDenotation
def hasTargetName(name: Name)(using Context): Boolean

Attributes

Inherited from:
SymDenotation
override def hasUniqueSym: Boolean

Denotation points to unique symbol; false for overloaded denotations and JointRef denotations.

Denotation points to unique symbol; false for overloaded denotations and JointRef denotations.

Attributes

Definition Classes
Inherited from:
SymDenotation

Attributes

Inherited from:
SingleDenotation
final def info(using Context): Type

The type info. The info is an instance of TypeType iff this is a type denotation Uncompleted denotations set myInfo to a LazyType.

The type info. The info is an instance of TypeType iff this is a type denotation Uncompleted denotations set myInfo to a LazyType.

Attributes

Inherited from:
Denotation
final def infoOrCompleter: Type

The type info, or, if symbol is not yet completed, the completer

The type info, or, if symbol is not yet completed, the completer

Attributes

Inherited from:
SymDenotation
override def initial: SymDenotation

The version of this SingleDenotation that was valid in the first phase of this run.

The version of this SingleDenotation that was valid in the first phase of this run.

Attributes

Definition Classes
Inherited from:
SymDenotation
override def installAfter(phase: DenotTransformer)(using Context): Unit

Install this denotation as the result of the given denotation transformer.

Install this denotation as the result of the given denotation transformer.

Attributes

Definition Classes
Inherited from:
SymDenotation

Attributes

Inherited from:
ClassDenotation

Invalidate all caches and fields that depend on base classes and their contents

Invalidate all caches and fields that depend on base classes and their contents

Attributes

Inherited from:
SingleDenotation

Attributes

Inherited from:
ClassDenotation

Attributes

Inherited from:
ClassDenotation
final def is(flag: Flag, butNot: FlagSet)(using Context): Boolean

Has this denotation the given flag set, whereas none of the flags in butNot are set?

Has this denotation the given flag set, whereas none of the flags in butNot are set?

Attributes

Inherited from:
SymDenotation
final def is(flag: Flag)(using Context): Boolean

Has this denotation one of given flag set?

Has this denotation one of given flag set?

Attributes

Inherited from:
SymDenotation
final def isAbsent(canForce: Boolean)(using Context): Boolean

Is symbol known to not exist?

Is symbol known to not exist?

Value parameters

canForce

If this is true, the info may be forced to avoid a false-negative result

Attributes

Inherited from:
SymDenotation

Is this symbol an abstract or alias type?

Is this symbol an abstract or alias type?

Attributes

Inherited from:
SymDenotation

Is this symbol an abstract type or type parameter?

Is this symbol an abstract type or type parameter?

Attributes

Inherited from:
SymDenotation
final def isAbstractType(using Context): Boolean

Is this symbol an abstract type?

Is this symbol an abstract type?

Attributes

Inherited from:
SymDenotation
final def isAccessibleFrom(pre: Type, superAccess: Boolean, whyNot: StringBuffer | Null)(using Context): Boolean

Is this definition accessible as a member of tree with type pre?

Is this definition accessible as a member of tree with type pre?

Value parameters

pre

The type of the tree from which the selection is made

superAccess

Access is via super Everything is accessible if pre is NoPrefix. A symbol with type NoType is not accessible for any other prefix. As a side effect, drop Local flags of members that are not accessed via the ThisType of their owner.

Attributes

Inherited from:
SymDenotation
final def isAliasType(using Context): Boolean

Is this symbol an alias type?

Is this symbol an alias type?

Attributes

Inherited from:
SymDenotation
final def isAllOf(fs: FlagSet, butNot: FlagSet)(using Context): Boolean

Has this denotation all of the flags in fs set, whereas none of the flags in butNot are set?

Has this denotation all of the flags in fs set, whereas none of the flags in butNot are set?

Attributes

Inherited from:
SymDenotation
final def isAllOf(fs: FlagSet)(using Context): Boolean

Has this denotation all of the flags in fs set?

Has this denotation all of the flags in fs set?

Attributes

Inherited from:
SymDenotation

Is this a Scala or Java annotation ?

Is this a Scala or Java annotation ?

Attributes

Inherited from:
SymDenotation
final def isAnonymousClass(using Context): Boolean

Is this symbol an anonymous class?

Is this symbol an anonymous class?

Attributes

Inherited from:
SymDenotation
final def isAnonymousFunction(using Context): Boolean

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
def isAsConcrete(that: Symbol)(using Context): Boolean

Is this symbol concrete, or that symbol deferred?

Is this symbol concrete, or that symbol deferred?

Attributes

Inherited from:
SymDenotation
final def isClass: Boolean

Is this denotation a class?

Is this denotation a class?

Attributes

Inherited from:
SymDenotation

Is this the constructor of a class?

Is this the constructor of a class?

Attributes

Inherited from:
SymDenotation
final def isCoDefinedGiven(cls: Symbol)(using Context): Boolean

Do this symbol and cls represent a pair of a given or implicit method and its associated class that were defined by a single definition? This can mean one of two things:

Do this symbol and cls represent a pair of a given or implicit method and its associated class that were defined by a single definition? This can mean one of two things:

  • the method and class are defined in a structural given instance, or
  • the class is an implicit class and the method is its implicit conversion.

Attributes

Inherited from:
SymDenotation
final def isCoDefinedWith(other: Symbol)(using Context): Boolean

Is this denotation defined in the same scope and compilation unit as that symbol?

Is this denotation defined in the same scope and compilation unit as that symbol?

Attributes

Inherited from:
SymDenotation
final def isCompleted: Boolean

The denotation is completed: info is not a lazy type and attributes have defined values

The denotation is completed: info is not a lazy type and attributes have defined values

Attributes

Inherited from:
SymDenotation
final def isCompleting: Boolean

The denotation is in train of being completed

The denotation is in train of being completed

Attributes

Inherited from:
SymDenotation
final def isConstructor: Boolean

Is this the constructor of a trait or a class

Is this the constructor of a trait or a class

Attributes

Inherited from:
SymDenotation
final def isContainedIn(boundary: Symbol)(using Context): Boolean

Is this definition contained in boundary? Same as ownersIterator contains boundary but more efficient.

Is this definition contained in boundary? Same as ownersIterator contains boundary but more efficient.

Attributes

Inherited from:
SymDenotation
def isCurrent(fs: FlagSet)(using Context): Boolean

Attributes

Inherited from:
SymDenotation
final def isEffectiveRoot(using Context): Boolean

Is this symbol the empty package class or its companion object?

Is this symbol the empty package class or its companion object?

Attributes

Inherited from:
SymDenotation

An erased value or an erased inline method or field

An erased value or an erased inline method or field

Attributes

Inherited from:
SymDenotation
final def isEffectivelyFinal(using Context): Boolean

A symbol is effectively final if it cannot be overridden in a subclass

A symbol is effectively final if it cannot be overridden in a subclass

Attributes

Inherited from:
SymDenotation
final def isEffectivelySealed(using Context): Boolean

A class is effectively sealed if has the final or sealed modifier, or it is defined in Scala 3 and is neither abstract nor open.

A class is effectively sealed if has the final or sealed modifier, or it is defined in Scala 3 and is neither abstract nor open.

Attributes

Inherited from:
SymDenotation
final def isEmptyPackage(using Context): Boolean

Is this symbol the empty package class or its companion object?

Is this symbol the empty package class or its companion object?

Attributes

Inherited from:
SymDenotation

is this symbol the result of an erroneous definition?

is this symbol the result of an erroneous definition?

Attributes

Inherited from:
SymDenotation
final def isExtensibleClass(using Context): Boolean

A class is extensible if it is not final, nor a module class, nor an anonymous class.

A class is extensible if it is not final, nor a module class, nor an anonymous class.

Attributes

Inherited from:
SymDenotation
final def isGetter(using Context): Boolean

Is this a getter?

Is this a getter?

Attributes

Inherited from:
SymDenotation
final def isImport: Boolean

Is this a symbol representing an import?

Is this a symbol representing an import?

Attributes

Inherited from:
SymDenotation
final def isIncompleteIn(base: Symbol)(using Context): Boolean

A member of class base is incomplete if (1) it is declared deferred or (2) it is abstract override and its super symbol in base is nonexistent or incomplete.

A member of class base is incomplete if (1) it is declared deferred or (2) it is abstract override and its super symbol in base is nonexistent or incomplete.

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def isLinkedWith(sym: Symbol)(using Context): Boolean

Is this symbol the same or a linked class of sym?

Is this symbol the same or a linked class of sym?

Attributes

Inherited from:
SymDenotation
final def isLocalDummy: Boolean

Is this a local template dummmy?

Is this a local template dummmy?

Attributes

Inherited from:
SymDenotation

Is this a denotation of a real class that does not have - either direct or inherited - initialization code?

Is this a denotation of a real class that does not have - either direct or inherited - initialization code?

Attributes

Inherited from:
SymDenotation

Is symbol a class for which no runtime representation exists?

Is symbol a class for which no runtime representation exists?

Attributes

Inherited from:
SymDenotation
final def isNullableClass(using Context): Boolean

Is this symbol a class of which null is a value?

Is this symbol a class of which null is a value?

Attributes

Inherited from:
SymDenotation

Is this symbol a class of which null is a value after erasure? For example, if -Yexplicit-nulls is set, String is not nullable before erasure, but it becomes nullable after erasure.

Is this symbol a class of which null is a value after erasure? For example, if -Yexplicit-nulls is set, String is not nullable before erasure, but it becomes nullable after erasure.

Attributes

Inherited from:
SymDenotation

Is symbol a primitive numeric value class?

Is symbol a primitive numeric value class?

Attributes

Inherited from:
SymDenotation
final def isOneOf(fs: FlagSet, butNot: FlagSet)(using Context): Boolean

Has this denotation one of the flags in fs set, whereas none of the flags in butNot are set?

Has this denotation one of the flags in fs set, whereas none of the flags in butNot are set?

Attributes

Inherited from:
SymDenotation
final def isOneOf(fs: FlagSet)(using Context): Boolean

Has this denotation one of the flags in fs set?

Has this denotation one of the flags in fs set?

Attributes

Inherited from:
SymDenotation

Is this symbol a user-defined opaque alias type?

Is this symbol a user-defined opaque alias type?

Attributes

Inherited from:
SymDenotation
final def isOverloaded: Boolean

Is this denotation overloaded?

Is this denotation overloaded?

Attributes

Inherited from:
Denotation

Is this symbol a package object or its module class?

Is this symbol a package object or its module class?

Attributes

Inherited from:
SymDenotation

Does this symbol denote the primary constructor of its enclosing class?

Does this symbol denote the primary constructor of its enclosing class?

Attributes

Inherited from:
SymDenotation

Is symbol a primitive value class?

Is symbol a primitive value class?

Attributes

Inherited from:
SymDenotation
final def isProperlyContainedIn(boundary: Symbol)(using Context): Boolean

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def isPublic(using Context): Boolean

Attributes

Inherited from:
SymDenotation
final def isRealClass(using Context): Boolean

Is this denotation a non-trait class?

Is this denotation a non-trait class?

Attributes

Inherited from:
SymDenotation
final def isRealMethod(using Context): Boolean

Is this a "real" method? A real method is a method which is:

Is this a "real" method? A real method is a method which is:

  • not an accessor
  • not an anonymous function

Attributes

Inherited from:
SymDenotation

True if the info of this denotation comes from a refinement.

True if the info of this denotation comes from a refinement.

Attributes

Inherited from:
SingleDenotation
final def isRefinementClass(using Context): Boolean

Is this symbol a class representing a refinement? These classes are used only temporarily in Typer and Unpickler as an intermediate step for creating Refinement types.

Is this symbol a class representing a refinement? These classes are used only temporarily in Typer and Unpickler as an intermediate step for creating Refinement types.

Attributes

Inherited from:
SymDenotation

Does this method or field need to be retained at runtime

Does this method or field need to be retained at runtime

Attributes

Inherited from:
SymDenotation

Does this method need to be retained at runtime

Does this method need to be retained at runtime

Attributes

Inherited from:
SymDenotation
final def isRoot: Boolean

Is this symbol the root class or its companion object?

Is this symbol the root class or its companion object?

Attributes

Inherited from:
SymDenotation
final def isScala2Macro(using Context): Boolean

Is this a Scala 2 macro

Is this a Scala 2 macro

Attributes

Inherited from:
SymDenotation

Is this a Scala 2 macro defined

Is this a Scala 2 macro defined

Attributes

Inherited from:
SymDenotation
final def isSelfSym(using Context): Boolean

Is this the denotation of a self symbol of some class? This is the case if one of two conditions holds:

Is this the denotation of a self symbol of some class? This is the case if one of two conditions holds:

  1. It is the symbol referred to in the selfInfo part of the ClassInfo which is the type of this symbol's owner.
  2. This symbol is owned by a class, it's selfInfo field refers to a type (indicating the self definition does not introduce a name), and the symbol's name is "_". TODO: Find a more robust way to characterize self symbols, maybe by spending a Flag on them?

Attributes

Inherited from:
SymDenotation

Is this symbol a class that extends java.io.Serializable ?

Is this symbol a class that extends java.io.Serializable ?

Attributes

Inherited from:
SymDenotation
final def isSetter(using Context): Boolean

Is this a setter?

Is this a setter?

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def isStableMember(using Context): Boolean

Is this a denotation of a stable term (or an arbitrary type)? Terms are stable if they are idempotent (as in TreeInfo.Idempotent): that is, they always return the same value, if any.

Is this a denotation of a stable term (or an arbitrary type)? Terms are stable if they are idempotent (as in TreeInfo.Idempotent): that is, they always return the same value, if any.

A member is stable, basically, if it behaves like a field projection: that is, it projects a constant result out of its owner.

However, a stable member might not yet be initialized (if it is an object or anyhow lazy). So the first call to a stable member might fail and/or produce side effects.

Attributes

Inherited from:
SymDenotation
final def isStatic(using Context): Boolean

Is this denotation static (i.e. with no outer instance)?

Is this denotation static (i.e. with no outer instance)?

Attributes

Inherited from:
SymDenotation
final def isStaticConstructor(using Context): Boolean

Does this symbol denote the static constructor of its enclosing class?

Does this symbol denote the static constructor of its enclosing class?

Attributes

Inherited from:
SymDenotation
final def isStaticOwner(using Context): Boolean

Is this a package class or module class that defines static symbols?

Is this a package class or module class that defines static symbols?

Attributes

Inherited from:
SymDenotation
final override def isSubClass(base: Symbol)(using Context): Boolean

Is this a subclass of the given class base?

Is this a subclass of the given class base?

Attributes

Definition Classes
Inherited from:
ClassDenotation

Is this a reference to a term symbol?

Is this a reference to a term symbol?

Attributes

Inherited from:
Denotation
final def isTopLevelClass(using Context): Boolean

Attributes

Inherited from:
SymDenotation
final def isTransparentClass(using Context): Boolean

Attributes

Inherited from:
SymDenotation
final override def isValueClass(using Context): Boolean

Is this symbol a class that extends AnyVal? Overridden in ClassDenotation

Is this symbol a class that extends AnyVal? Overridden in ClassDenotation

Attributes

Definition Classes
Inherited from:
ClassDenotation

Is this a synthetic method that represents conversions between representations of a value class These methods are generated in ExtensionMethods and used in ElimErasedValueType.

Is this a synthetic method that represents conversions between representations of a value class These methods are generated in ExtensionMethods and used in ElimErasedValueType.

Attributes

Inherited from:
SymDenotation

Symbol is an owner that would be skipped by effectiveOwner. Skipped are

Symbol is an owner that would be skipped by effectiveOwner. Skipped are

  • package objects
  • non-lazy valdefs

Attributes

Inherited from:
SymDenotation

Is this symbol a toplevel definition in a package object?

Is this symbol a toplevel definition in a package object?

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def last: SingleDenotation

Attributes

Inherited from:
SingleDenotation

A class that in source code would be lexically enclosing

A class that in source code would be lexically enclosing

Attributes

Inherited from:
SymDenotation
final def linkedClass(using Context): Symbol

If this is a class, the module class of its companion object. If this is a module class, its companion class. NoSymbol otherwise.

If this is a class, the module class of its companion object. If this is a module class, its companion class. NoSymbol otherwise.

Attributes

Inherited from:
SymDenotation

A denotation with the info of this denotation transformed using f

A denotation with the info of this denotation transformed using f

Attributes

Inherited from:
SingleDenotation
def mapInherited(ownDenots: PreDenotation, prevDenots: PreDenotation, pre: Type)(using Context): SingleDenotation

Keep only those inherited members M of this predenotation for which the following is true

Keep only those inherited members M of this predenotation for which the following is true

  • M is not marked Private
  • If M has a unique symbol, it does not appear in prevDenots.
  • M's signature as seen from prefix pre does not appear in ownDenots Return the denotation as seen from pre. Called from SymDenotations.computeMember. There, ownDenots are the denotations found in the base class, which shadow any inherited denotations with the same signature. prevDenots are the denotations that are defined in the class or inherited from a base type which comes earlier in the linearization.

Attributes

Inherited from:
SingleDenotation
final def markAbsent()(using Context): Unit

Make denotation not exist.

Make denotation not exist.

Attributes

Inherited from:
SymDenotation

()T and => T types should be treated as equivalent for this symbol. Note: For the moment, we treat Scala-2 compiled symbols as loose matching, because the Scala library does not always follow the right conventions. Examples are: isWhole(), toInt(), toDouble() in BigDecimal, Numeric, RichInt, ScalaNumberProxy.

()T and => T types should be treated as equivalent for this symbol. Note: For the moment, we treat Scala-2 compiled symbols as loose matching, because the Scala library does not always follow the right conventions. Examples are: isWhole(), toInt(), toDouble() in BigDecimal, Numeric, RichInt, ScalaNumberProxy.

Attributes

Inherited from:
SymDenotation
def matches(other: SingleDenotation)(using Context): Boolean

Group contains a denotation with the same signature as other

Group contains a denotation with the same signature as other

Attributes

Inherited from:
SingleDenotation
def matchesImportBound(bound: Type)(using Context): Boolean

Attributes

Inherited from:
SingleDenotation
def matchesLoosely(other: SingleDenotation, alwaysCompareTypes: Boolean)(using Context): Boolean

matches without a target name check.

matches without a target name check.

For definitions coming from different languages, we pick a common language to compute their signatures. This allows us for example to override some Java definitions from Scala even if they have a different erasure (see i8615b, i9109b), Erasure takes care of adding any necessary bridge to make this work at runtime.

Attributes

Inherited from:
SingleDenotation
final def matchingDecl(inClass: Symbol, site: Type)(using Context): Symbol

The non-private symbol whose name and type matches the type of this symbol in the given class.

The non-private symbol whose name and type matches the type of this symbol in the given class.

Value parameters

inClass

The class containing the result symbol's definition

site

The base type from which member types are computed inClass <-- find denot.symbol class C { <-- symbol is here site: Subtype of both inClass and C

Attributes

Inherited from:
SymDenotation
def matchingDenotation(site: Type, targetType: Type, targetName: Name)(using Context): SingleDenotation

The alternative of this denotation that has a type matching targetType when seen as a member of type site and that has a target name matching targetName, or NoDenotation if none exists.

The alternative of this denotation that has a type matching targetType when seen as a member of type site and that has a target name matching targetName, or NoDenotation if none exists.

Attributes

Inherited from:
Denotation
final def matchingMember(site: Type)(using Context): Symbol

The non-private member of site whose name and type matches the type of this symbol

The non-private member of site whose name and type matches the type of this symbol

Attributes

Inherited from:
SymDenotation
final def mayHaveCommonChild(that: ClassSymbol)(using Context): Boolean

Is it possible that a class inherits both this and that?

Is it possible that a class inherits both this and that?

Attributes

Returns

The result may contain false positives, but never false negatives.

Note

The test is based on single-class inheritance and the closed hierarchy of final classes.

Inherited from:
ClassDenotation
def meet(that: Denotation, pre: Type, safeIntersection: Boolean)(using Context): Denotation

Form a denotation by conjoining with denotation that.

Form a denotation by conjoining with denotation that.

NoDenotations are dropped. MultiDenotations are handled by merging parts with same signatures. SingleDenotations with equal signatures are joined by following this sequence of steps:

  1. If exactly one the denotations has an inaccessible symbol, pick the other one.
  2. Otherwise, if one of the infos overrides the other one, and the associated symbol does not score strictly lower than the other one, pick the associated denotation.
  3. Otherwise, if the two infos can be combined with infoMeet, pick that as result info, and pick the symbol that scores higher as result symbol, or pick sym1 as a tie breaker. The picked info and symbol are combined in a JointDenotation.
  4. Otherwise, if one of the two symbols scores strongly higher than the other one, pick the associated denotation.
  5. Otherwise return a multi-denotation consisting of both denotations.

Symbol scoring is determined according to the following ranking where earlier criteria trump later ones. Cases marked with (*) give a strong score advantage, the others a weak one.

  1. The symbol exists, and the other one does not. (*)
  2. The symbol is not a bridge, but the other one is. (*)
  3. The symbol is concrete, and the other one is deferred
  4. The symbol appears before the other in the linearization of pre
  5. The symbol's visibility is strictly greater than the other one's.
  6. The symbol is a method, but the other one is not.

Attributes

Inherited from:
Denotation

If false, this class member cannot possibly participate in an override, either as overrider or overridee.

If false, this class member cannot possibly participate in an override, either as overrider or overridee.

Attributes

Inherited from:
SymDenotation
final def membersNamed(name: Name)(using Context): PreDenotation

All members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

All members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

Attributes

Inherited from:
ClassDenotation
final def membersNamedNoShadowingBasedOnFlags(name: Name, required: FlagSet, excluded: FlagSet)(using Context): PreDenotation

All members of this class that have the given name and match the required and excluded flag sets; members excluded based on the flag sets do not shadow inherited members that would not be excluded.

All members of this class that have the given name and match the required and excluded flag sets; members excluded based on the flag sets do not shadow inherited members that would not be excluded.

The elements of the returned pre-denotation all have existing symbols.

Attributes

Inherited from:
ClassDenotation

Do members of this symbol need translation via asSeenFrom when accessed via prefix pre?

Do members of this symbol need translation via asSeenFrom when accessed via prefix pre?

Attributes

Inherited from:
SymDenotation
final def moduleClass(using Context): Symbol

If this a module, return the corresponding class, if this is a module, return itself, otherwise NoSymbol

If this a module, return the corresponding class, if this is a module, return itself, otherwise NoSymbol

Attributes

Inherited from:
SymDenotation
final def name(using Context): Name

The name of the denotation

The name of the denotation

Attributes

Inherited from:
SingleDenotation

The NamedType representing this denotation at its original location. Same as either typeRef or termRef depending whether this denotes a type or not.

The NamedType representing this denotation at its original location. Same as either typeRef or termRef depending whether this denotes a type or not.

Attributes

Inherited from:
SymDenotation
final def nextOverriddenSymbol(using Context): Symbol

Equivalent to allOverriddenSymbols.headOption.getOrElse(NoSymbol) but more efficient.

Equivalent to allOverriddenSymbols.headOption.getOrElse(NoSymbol) but more efficient.

Attributes

Inherited from:
SymDenotation

All non-private members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

All non-private members of this class that have the given name. The elements of the returned pre-denotation all have existing symbols.

Attributes

Inherited from:
ClassDenotation
def opaqueAlias(using Context): Type

The alias of an opaque type alias that's stored in the self type of the containing object.

The alias of an opaque type alias that's stored in the self type of the containing object.

Attributes

Inherited from:
SymDenotation
def opaqueToBounds(info: Type, rhs: Tree, tparams: List[TypeSymbol])(using Context): Type

If this is an opaque alias, replace the right hand side info by appropriate bounds and store info in the refinement of the self type of the enclosing class. Otherwise return info

If this is an opaque alias, replace the right hand side info by appropriate bounds and store info in the refinement of the self type of the enclosing class. Otherwise return info

Value parameters

info

Is assumed to be a (lambda-abstracted) right hand side TypeAlias of the opaque type definition.

rhs

The right hand side tree of the type definition

tparams

The type parameters with which the right-hand side bounds should be abstracted

Attributes

Inherited from:
SymDenotation
inline def orElse(inline that: SingleDenotation): SingleDenotation

Attributes

Inherited from:
SingleDenotation
inline def orElse(inline that: Denotation): Denotation

If this denotation does not exist, fallback to alternative

If this denotation does not exist, fallback to alternative

Attributes

Inherited from:
Denotation
final def originalName(using Context): Name

The effective name with which the denoting symbol was created

The effective name with which the denoting symbol was created

Attributes

Inherited from:
SymDenotation
final def originalOwner(using Context): Symbol

The owner with which the denoting symbol was created.

The owner with which the denoting symbol was created.

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def overriddenSymbol(inClass: ClassSymbol, siteClass: ClassSymbol)(using Context): Symbol

The symbol, in class inClass, that is overridden by this denotation in class siteClass.

The symbol, in class inClass, that is overridden by this denotation in class siteClass.

Attributes

Inherited from:
SymDenotation
final def overridingSymbol(inClass: ClassSymbol)(using Context): Symbol

The symbol overriding this symbol in given subclass ofclazz.

The symbol overriding this symbol in given subclass ofclazz.

Value parameters

ofclazz

is a subclass of this symbol's owner

Attributes

Inherited from:
SymDenotation
def owner: Symbol

The owner of the symbol; overridden in NoDenotation

The owner of the symbol; overridden in NoDenotation

Attributes

Inherited from:
SymDenotation
final def ownersIterator(using Context): Iterator[Symbol]

The chain of owners of this denotation, starting with the denoting symbol itself

The chain of owners of this denotation, starting with the denoting symbol itself

Attributes

Inherited from:
SymDenotation

The term parameter accessors of this class. Both getters and setters are returned in this list.

The term parameter accessors of this class. Both getters and setters are returned in this list.

Attributes

Inherited from:
ClassDenotation

The term parameter getters of this class.

The term parameter getters of this class.

Attributes

Inherited from:
ClassDenotation
final def paramSymss(using Context): List[List[Symbol]]

The symbols of each type parameter list and value parameter list of this method, or Nil if this isn't a method.

The symbols of each type parameter list and value parameter list of this method, or Nil if this isn't a method.

Makes use of rawParamss when present, or constructs fresh parameter symbols otherwise. This method can be allocation-heavy.

Attributes

Inherited from:
SymDenotation
def parentSyms(using Context): List[Symbol]

The symbols of the parent classes.

The symbols of the parent classes.

Attributes

Inherited from:
ClassDenotation
def parentTypes(using Context): List[Type]

The types of the parent classes.

The types of the parent classes.

Attributes

Inherited from:
ClassDenotation
def prefix: Type

For SymDenotation, this is NoPrefix. For other denotations this is the prefix under which the denotation was constructed.

For SymDenotation, this is NoPrefix. For other denotations this is the prefix under which the denotation was constructed.

Note that asSeenFrom might return a SymDenotation and therefore in general one cannot rely on prefix being set, see Config.reuseSymDenotations for details.

Attributes

Inherited from:
SingleDenotation
override def primaryConstructor(using Context): Symbol

The primary constructor of a class or trait, NoSymbol if not applicable.

The primary constructor of a class or trait, NoSymbol if not applicable.

Attributes

Definition Classes
Inherited from:
ClassDenotation
final def privateWithin(using Context): Symbol

The privateWithin boundary, NoSymbol if no boundary is given.

The privateWithin boundary, NoSymbol if no boundary is given.

Attributes

Inherited from:
SymDenotation
final def rawParamss: List[List[Symbol]]

If this is a method, the parameter symbols, by section. Both type and value parameters are included. Empty sections are skipped.

If this is a method, the parameter symbols, by section. Both type and value parameters are included. Empty sections are skipped.

Attributes

Inherited from:
SymDenotation
final def rawParamss_=(pss: List[List[Symbol]]): Unit

Attributes

Inherited from:
SymDenotation

Like termRef, but objects in the prefix are represented by their singleton type, this means we output pre.O.member rather than pre.O$.this.member.

Like termRef, but objects in the prefix are represented by their singleton type, this means we output pre.O.member rather than pre.O$.this.member.

This is required to avoid owner crash in ExplicitOuter. See tests/pos/i10769.scala

Attributes

Inherited from:
SymDenotation

Like thisType, but objects in the type are represented by their singleton type, this means we output pre.O.member rather than pre.O$.this.member.

Like thisType, but objects in the type are represented by their singleton type, this means we output pre.O.member rather than pre.O$.this.member.

Attributes

Inherited from:
SymDenotation

Like typeRef, but objects in the prefix are represented by their singleton type, this means we output pre.O.member rather than pre.O$.this.member.

Like typeRef, but objects in the prefix are represented by their singleton type, this means we output pre.O.member rather than pre.O$.this.member.

This is required to avoid owner crash in ExplicitOuter. See tests/pos/i10769.scala

Attributes

Inherited from:
SymDenotation
override def registerCompanion(companion: Symbol)(using Context): Unit

Register companion class

Register companion class

Attributes

Definition Classes
Inherited from:
ClassDenotation
override def registeredCompanion(using Context): Symbol

The registered companion; overridden in ClassDenotation

The registered companion; overridden in ClassDenotation

Attributes

Definition Classes
Inherited from:
ClassDenotation
override def registeredCompanion_=(c: Symbol): Unit

Attributes

Definition Classes
Inherited from:
ClassDenotation
final def relevantFlagsFor(fs: FlagSet)(using Context): FlagSet

Attributes

Inherited from:
SymDenotation
final def removeAnnotation(cls: Symbol)(using Context): Unit

Remove annotation with given class from this denotation

Remove annotation with given class from this denotation

Attributes

Inherited from:
SymDenotation
def replace(prev: Symbol, replacement: Symbol)(using Context): Unit

Replace symbol prev (if defined in current class) by symbol replacement. If prev is not defined in current class, do nothing.

Replace symbol prev (if defined in current class) by symbol replacement. If prev is not defined in current class, do nothing.

Attributes

Inherited from:
ClassDenotation

Attributes

Inherited from:
Denotation
def requiredMethod(pname: PreName, argTypes: List[Type])(using Context): TermSymbol

Attributes

Inherited from:
Denotation

Attributes

Inherited from:
Denotation
def requiredMethodRef(name: PreName, argTypes: List[Type])(using Context): TermRef

Attributes

Inherited from:
Denotation

Attributes

Inherited from:
Denotation
def requiredSymbol(kind: String, name: Name, site: Denotation, args: List[Type], source: AbstractFile | Null, generateStubs: Boolean)(p: Symbol => Boolean)(using Context): Symbol

Return symbol in this denotation that satisfies the given predicate. if generateStubs is specified, return a stubsymbol if denotation is a missing ref. Throw a TypeError if predicate fails to disambiguate symbol or no alternative matches.

Return symbol in this denotation that satisfies the given predicate. if generateStubs is specified, return a stubsymbol if denotation is a missing ref. Throw a TypeError if predicate fails to disambiguate symbol or no alternative matches.

Attributes

Inherited from:
Denotation
def requiredType(pname: PreName)(using Context): TypeSymbol

Attributes

Inherited from:
Denotation
def requiredValue(pname: PreName)(using Context): TermSymbol

Attributes

Inherited from:
Denotation

Attributes

Inherited from:
Denotation
final def resetFlag(flags: FlagSet): Unit

Unset given flags(s) of this denotation

Unset given flags(s) of this denotation

Attributes

Inherited from:
SymDenotation
final def scalacLinkedClass(using Context): Symbol

Attributes

Inherited from:
SymDenotation
final def sealedDescendants(using Context): List[Symbol]

Same as sealedStrictDescendants but prepends this symbol as well.

Same as sealedStrictDescendants but prepends this symbol as well.

Attributes

Inherited from:
SymDenotation

Recursively assemble all children of this symbol, Preserves order of insertion.

Recursively assemble all children of this symbol, Preserves order of insertion.

Attributes

Inherited from:
SymDenotation

Attributes

Inherited from:
SymDenotation
final def setFlag(flags: FlagSet): Unit

Set given flags(s) of this denotation

Set given flags(s) of this denotation

Attributes

Inherited from:
SymDenotation
def setFlagFrom(phase: DenotTransformer, flags: FlagSet)(using Context): Unit

Set flag flags in current phase and in all phases that follow

Set flag flags in current phase and in all phases that follow

Attributes

Inherited from:
SymDenotation
final def setNoInitsFlags(parentFlags: FlagSet, bodyFlags: FlagSet): Unit

Set applicable flags in {NoInits, PureInterface}

Set applicable flags in {NoInits, PureInterface}

Value parameters

bodyFlags

The flags that match the class or trait's body

parentFlags

The flags that match the class or trait's parents

Attributes

Inherited from:
SymDenotation
final def setParamss(paramss: List[List[Symbol]])(using Context): Unit

Attributes

Inherited from:
SymDenotation
final def setParamssFromDefs(paramss: List[ParamClause])(using Context): Unit

Attributes

Inherited from:
SymDenotation
final def setStableConstructor()(using Context): Unit

Attributes

Inherited from:
SymDenotation
def setTargetName(name: Name): Unit

Attributes

Inherited from:
SymDenotation
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Attributes

Inherited from:
Showable
def showDcl(using Context): String

Show declaration string; useful for showing declarations as seen from subclasses.

Show declaration string; useful for showing declarations as seen from subclasses.

Attributes

Inherited from:
SingleDenotation
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Attributes

Inherited from:
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Attributes

Inherited from:
Showable
def signature(sourceLanguage: SourceLanguage)(using Context): Signature

Overload of signature which lets the caller pick the language used to compute the signature of the info. Useful to match denotations defined in different classes (see matchesLoosely).

Overload of signature which lets the caller pick the language used to compute the signature of the info. Useful to match denotations defined in different classes (see matchesLoosely).

Attributes

Inherited from:
SingleDenotation
final def signature(using Context): Signature

For SymDenotations, the language-specific signature of the info, depending on where the symbol is defined. For non-SymDenotations, the Scala 3 signature.

For SymDenotations, the language-specific signature of the info, depending on where the symbol is defined. For non-SymDenotations, the Scala 3 signature.

Invariants:

  • Before erasure, the signature of a denotation is always equal to the signature of its corresponding initial denotation.
  • Two distinct overloads will have SymDenotations with distinct signatures (the SELECTin tag in Tasty relies on this to refer to an overload unambiguously). Note that this only applies to SymDenotations, in general we cannot assume that distinct SingleDenotations will have distinct signatures (cf #9050).

Attributes

Inherited from:
SingleDenotation

Skips symbol that are not owned by a class

Skips symbol that are not owned by a class

Attributes

Inherited from:
SymDenotation

Skip any denotations that have been removed by an installAfter or that are otherwise undefined.

Skip any denotations that have been removed by an installAfter or that are otherwise undefined.

Attributes

Inherited from:
SingleDenotation
final def skipWeakOwner(using Context): Symbol

If this is a weak owner, its owner, otherwise the denoting symbol.

If this is a weak owner, its owner, otherwise the denoting symbol.

Attributes

Inherited from:
SymDenotation
final def sourceModule(using Context): Symbol

If this a module class, return the corresponding module, if this is a module, return itself, otherwise NoSymbol

If this a module class, return the corresponding module, if this is a module, return itself, otherwise NoSymbol

Attributes

Inherited from:
SymDenotation
def staleSymbolError(using Context): Nothing

Attributes

Inherited from:
SingleDenotation

Attributes

Inherited from:
SingleDenotation

The unique alternative of this denotation that satisfies the predicate p, or NoDenotation if no satisfying alternative exists.

The unique alternative of this denotation that satisfies the predicate p, or NoDenotation if no satisfying alternative exists.

Attributes

Throws
TypeError

if there is at more than one alternative that satisfies p.

Inherited from:
SingleDenotation
def superClass(using Context): Symbol

The symbol of the superclass, NoSymbol if no superclass exists

The symbol of the superclass, NoSymbol if no superclass exists

Attributes

Inherited from:
ClassDenotation
final def superSymbolIn(base: Symbol)(using Context): Symbol

The symbol accessed by a super in the definition of this symbol when seen from class base. This symbol is always concrete. pre: this.owner is in the base class sequence of base.

The symbol accessed by a super in the definition of this symbol when seen from class base. This symbol is always concrete. pre: this.owner is in the base class sequence of base.

Attributes

Inherited from:
SymDenotation
def targetName(using Context): Name

The name given in a @targetName annotation if one is present, name otherwise

The name given in a @targetName annotation if one is present, name otherwise

Attributes

Inherited from:
SymDenotation
def termRef(using Context): TermRef

Attributes

Inherited from:
SymDenotation
override def thisType(using Context): Type

The this-type depends on the kind of class:

The this-type depends on the kind of class:

  • for a package class p: ThisType(TypeRef(Noprefix, p))
  • for a module class m: A term ref to m's source module.
  • for all other classes c with owner o: ThisType(TypeRef(o.thisType, c))

Attributes

Definition Classes
Inherited from:
ClassDenotation
final def toDenot(pre: Type)(using Context): Denotation

Convert to full denotation by &-ing all elements

Convert to full denotation by &-ing all elements

Attributes

Inherited from:
Denotation
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Inherited from:
SymDenotation
def toText(printer: Printer): Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

Attributes

Inherited from:
Denotation
final def topLevelClass(using Context): Symbol

The top-level class containing this denotation, except for a toplevel module, where its module class is returned.

The top-level class containing this denotation, except for a toplevel module, where its module class is returned.

Attributes

Inherited from:
SymDenotation

Apply a transformation f to all denotations in this group that start at or after given phase. Denotations are replaced while keeping the same validity periods.

Apply a transformation f to all denotations in this group that start at or after given phase. Denotations are replaced while keeping the same validity periods.

Attributes

Definition Classes
Inherited from:
SymDenotation

Apply transform f to all annotations of this denotation

Apply transform f to all annotations of this denotation

Attributes

Inherited from:
SymDenotation
final override def typeParamCreationFlags: FlagSet

The flags to be used for a type parameter owned by this symbol. Overridden by ClassDenotation.

The flags to be used for a type parameter owned by this symbol. Overridden by ClassDenotation.

Attributes

Definition Classes
Inherited from:
ClassDenotation
final override def typeParams(using Context): List[TypeSymbol]

The type parameters of this class

The type parameters of this class

Attributes

Definition Classes
Inherited from:
ClassDenotation
override def typeRef(using Context): TypeRef

Attributes

Definition Classes
Inherited from:
ClassDenotation

The field accessed by a getter or setter, or if it does not exists, the getter of a setter, or if that does not exist the symbol itself.

The field accessed by a getter or setter, or if it does not exists, the getter of a setter, or if that does not exist the symbol itself.

Attributes

Inherited from:
SymDenotation

The same as getAnnotation, but without ensuring that the symbol carrying the annotation is completed

The same as getAnnotation, but without ensuring that the symbol carrying the annotation is completed

Attributes

Inherited from:
SymDenotation
final def unforcedDecls(using Context): Scope

The symbols defined in this class or object. Careful! This does not force the type, so is compilation order dependent. This method should be used only in the following circumstances:

The symbols defined in this class or object. Careful! This does not force the type, so is compilation order dependent. This method should be used only in the following circumstances:

  1. When accessing type parameters or type parameter accessors (both are entered before completion).
  2. When obtaining the current scope in order to enter, rename or delete something there.
  3. When playing it safe in order not to raise CylicReferences, e.g. for printing things or taking more efficient shortcuts (e.g. the stillValid test).

Attributes

Inherited from:
SymDenotation
final def unforcedInfo: Option[Type]

Optionally, the info if it is completed

Optionally, the info if it is completed

Attributes

Inherited from:
SymDenotation

The union of two groups.

The union of two groups.

Attributes

Inherited from:
PreDenotation
final def updateAnnotation(annot: Annotation)(using Context): Unit

Remove any annotations with same class as annot, and add annot

Remove any annotations with same class as annot, and add annot

Attributes

Inherited from:
SymDenotation
final def validFor: Period

Attributes

Inherited from:
Denotation
final def validFor_=(p: Period): Unit

Attributes

Inherited from:
Denotation
final def variance(using Context): Variance

The variance of this type parameter or type member as a subset of {Covariant, Contravariant}

The variance of this type parameter or type member as a subset of {Covariant, Contravariant}

Attributes

Inherited from:
SymDenotation

Inherited fields

Attributes

Inherited from:
Denotation
final val maybeOwner: Symbol

Attributes

Inherited from:
SymDenotation
protected var myInfo: Type

Attributes

Inherited from:
Denotation
protected var nextInRun: SingleDenotation

The next SingleDenotation in this run, with wrap-around from last to first.

The next SingleDenotation in this run, with wrap-around from last to first.

There may be several SingleDenotations with different validity representing the same underlying definition at different phases. These are called a "flock". Flock members are generated by

Attributes

Inherited from:
SingleDenotation