JointRefDenotation

dotty.tools.dotc.core.Denotations$.JointRefDenotation
class JointRefDenotation(symbol: Symbol, initInfo: Type, initValidFor: Period, prefix: Type, val isRefinedMethod: Boolean) extends NonSymSingleDenotation

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

Value members

Concrete methods

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 methods

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
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

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

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
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

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
protected def computeAsSeenFrom(pre: Type)(using Context): SingleDenotation

Attributes

Inherited from:
SingleDenotation
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

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

Attributes

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

Attributes

Inherited from:
SingleDenotation
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

Is this denotation different from NoDenotation or an ErrorDenotation?

Is this denotation different from NoDenotation or an ErrorDenotation?

Attributes

Inherited from:
Denotation
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

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
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

Inherited from:
Denotation
final def first: SingleDenotation

First/last denotation in the group

First/last denotation in the group

Attributes

Inherited from:
SingleDenotation

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

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

The type info, or, if this is a SymDenotation where the symbol is not yet completed, the completer

The type info, or, if this is a SymDenotation where the symbol is not yet completed, the completer

Attributes

Inherited from:
NonSymSingleDenotation

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

Inherited from:
SingleDenotation
protected def installAfter(phase: DenotTransformer)(using Context): Unit

Install this denotation to be the result of the given denotation transformer. This is the implementation of the same-named method in SymDenotations. It's placed here because it needs access to private fields of SingleDenotation.

Install this denotation to be the result of the given denotation transformer. This is the implementation of the same-named method in SymDenotations. It's placed here because it needs access to private fields of SingleDenotation.

Attributes

Inherited from:
SingleDenotation

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
final def isOverloaded: Boolean

Is this denotation overloaded?

Is this denotation overloaded?

Attributes

Inherited from:
Denotation

Is this a reference to a term symbol?

Is this a reference to a term symbol?

Attributes

Inherited from:
Denotation
final def last: SingleDenotation

Attributes

Inherited from:
SingleDenotation

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
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
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
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
final def name(using Context): Name

The name of the denotation

The name of the denotation

Attributes

Inherited from:
SingleDenotation
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

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
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

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
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
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:
SingleDenotation
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

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

Inherited from:
SingleDenotation

The union of two groups.

The union of two groups.

Attributes

Inherited from:
PreDenotation
final def validFor: Period

Attributes

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

Attributes

Inherited from:
Denotation

Concrete fields

override val isRefinedMethod: Boolean

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

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

Attributes

Inherited fields

Attributes

Inherited from:
Denotation
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