MultiDenotation

case class MultiDenotation(denot1: Denotation, denot2: Denotation) extends Denotation with MultiPreDenotation

An overloaded denotation consisting of the alternatives of both given denotations.

trait Product
trait Equals
trait Showable
class Object
trait Matchable
class Any

Type members

Value members

Concrete methods

def accessibleFrom(pre: Type, superAccess: Boolean)(using Context): Denotation
def atSignature(sig: Signature, targetName: Name, site: Type, relaxed: Boolean)(using Context): Denotation
final def isType: Boolean
def mapInfo(f: Type => Type)(using Context): Denotation
final def name(using Context): Name
final def signature(using Context): Signature
override def toString: String
Definition Classes
Any
final def validFor: Period

Inherited methods

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

The set of alternative single-denotations making up this denotation

The set of alternative single-denotations making up this denotation

Inherited from:
Denotation

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

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

Inherited from:
PreDenotation
Inherited from:
Denotation

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

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

Inherited from:
Denotation
final def containsSym(sym: Symbol): Boolean
Inherited from:
Denotation
protected def derivedUnion(denot1: PreDenotation, denot2: PreDenotation): PreDenotation
Inherited from:
MultiPreDenotation
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).

Inherited from:
Denotation

Is this denotation different from NoDenotation or an ErrorDenotation?

Is this denotation different from NoDenotation or an ErrorDenotation?

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

Inherited from:
Showable
def filterWithFlags(required: FlagSet, excluded: FlagSet)(using Context): PreDenotation
Inherited from:
MultiPreDenotation
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.

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

Inherited from:
Denotation

Is this denotation overloaded?

Is this denotation overloaded?

Inherited from:
Denotation

Is this a reference to a term symbol?

Is this a reference to a term symbol?

Inherited from:
Denotation
def mapInherited(owndenot: PreDenotation, prevdenot: PreDenotation, pre: Type)(using Context): PreDenotation
Inherited from:
MultiPreDenotation
Inherited from:
MultiPreDenotation
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.

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

Inherited from:
Denotation
Inherited from:
Product
Inherited from:
Denotation
def requiredMethod(pname: PreName, argTypes: List[Type])(using Context): TermSymbol
Inherited from:
Denotation
Inherited from:
Denotation
def requiredMethodRef(name: PreName, argTypes: List[Type])(using Context): TermRef
Inherited from:
Denotation
Inherited from:
Denotation
def requiredSymbol(kind: String, name: Name, site: Denotation, args: List[Type], source: AbstractFile, 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.

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

The string representation of this showable element.

The string representation of this showable element.

Inherited from:
Showable
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).

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.

Inherited from:
Showable
final def toDenot(pre: Type)(using Context): Denotation
Inherited from:
Denotation
def toText(printer: Printer): Text
Inherited from:
Denotation

The union of two groups.

The union of two groups.

Inherited from:
PreDenotation

Inherited fields

protected var myInfo: Type
Inherited from:
Denotation
Inherited from:
Denotation