A denotation is the result of resolving a name (either simple identifier or select) during a given period.
Denotations can be combined with &
and |
.
& is conjunction, | is disjunction.
&
will create an overloaded denotation from two
non-overloaded denotations if their signatures differ.
Analogously |
of two denotations with different signatures will give
an empty denotation NoDenotation
.
A denotation might refer to NoSymbol
. This is the case if the denotation
was produced from a disjunction of two denotations with different symbols
and there was no common symbol in a superclass that could substitute for
both symbols. Here is an example:
Say, we have:
class A { def f: A } class B { def f: B } val x: A | B = if (test) new A else new B val y = x.f
Then the denotation of y
is SingleDenotation(NoSymbol, A | B)
.
Constructors
Members
Form a denotation by conjoining with denotation that
.
NoDenotations are dropped. MultiDenotations are handled by merging parts with same signatures. Sin...
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 as follows:
In a first step, consider only those denotations which have symbols
that are accessible from prefix pre
.
If there are several such denotations, try to pick one by applying the following three precedence rules in decreasing order of priority:
- Prefer denotations with more specific infos.
- If infos are equally specific, prefer denotations with concrete symbols over denotations with abstract symbols.
- If infos are equally specific and symbols are equally concrete, prefer denotations with symbols defined in subclasses over denotations with symbols defined in proper superclasses.
If there is exactly one (preferred) accessible denotation, return it.
If there is no preferred accessible denotation, return a JointRefDenotation
with one of the operand symbols (unspecified which one), and an info which
is the intersection (using &
or safe_&
if safeIntersection
is true)
of the infos of the operand denotations.
If SingleDenotations with different signatures are joined, return NoDenotation.
Form a denotation by conjoining with denotation that
.
NoDenotations are dropped. MultiDenotations are handled by merging parts with same signatures. Sin...
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 as follows:
In a first step, consider only those denotations which have symbols
that are accessible from prefix pre
.
If there are several such denotations, try to pick one by applying the following three precedence rules in decreasing order of priority:
- Prefer denotations with more specific infos.
- If infos are equally specific, prefer denotations with concrete symbols over denotations with abstract symbols.
- If infos are equally specific and symbols are equally concrete, prefer denotations with symbols defined in subclasses over denotations with symbols defined in proper superclasses.
If there is exactly one (preferred) accessible denotation, return it.
If there is no preferred accessible denotation, return a JointRefDenotation
with one of the operand symbols (unspecified which one), and an info which
is the intersection (using &
or safe_&
if safeIntersection
is true)
of the infos of the operand denotations.
If SingleDenotations with different signatures are joined, return NoDenotation.
The denotation made up from the alternatives of this denotation that
are accessible from prefix pre
, or NoDenotation if no accessible alternative exist...
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 exist...
The denotation made up from the alternatives of this denotation that
are accessible from prefix pre
, or NoDenotation if no accessible alternative exists.
The set of alternative single-denotations making up this denotation
The set of alternative single-denotations making up this denotation
The alternatives of this denotation that satisfy the predicate p
.
The alternatives of this denotation that satisfy the predicate p
.
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
.
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
.
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
.
If this is a SingleDenotation, return it, otherwise throw a TypeError
If this is a SingleDenotation, return it, otherwise throw a TypeError
The variant of this denotation that's current in the given context. If no such denotation exists, returns the denotation with each alternative at its fi...
The variant of this denotation that's current in the given context. If no such denotation exists, returns the denotation with each alternative at its first point of definition.
If this denotation is overloaded, filter with given predicate. If result is still overloaded throw a TypeError. Note: disambiguate is slightly different...
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).
Is this denotation different from NoDenotation or an ErrorDenotation?
Is this denotation different from NoDenotation or an ErrorDenotation?
Find member of this denotation with given name and
produce a denotation that contains the type of the member
as seen from given prefix pre
. Exclude all...
Find member of this denotation with given name and
produce a denotation that contains the type of the member
as seen from given prefix pre
. Exclude all members that have
flags in excluded
from consideration.
Does this denotation have an alternative that satisfies the predicate p
?
Does this denotation have an alternative that satisfies the predicate p
?
The type info of the denotation, exists only for non-overloaded denotations
The type info of the denotation, exists only for non-overloaded denotations
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
Is this denotation overloaded?
Is this denotation overloaded?
Is this a reference to a term symbol?
Is this a reference to a term symbol?
Is this a reference to a type symbol?
Is this a reference to a type symbol?
A denotation with the info of this denotation transformed using f
A denotation with the info of this denotation transformed using f
The alternative of this denotation that has a type matching targetType
when seen
as a member of type site
, NoDenotation
if none exists.
The alternative of this denotation that has a type matching targetType
when seen
as a member of type site
, NoDenotation
if none exists.
Handle merge conflict by throwing a MergeError
exception
Handle merge conflict by throwing a MergeError
exception
Merge two lists of names. If names in corresponding positions match, keep them, otherwise generate new synthetic names.
Merge two lists of names. If names in corresponding positions match, keep them, otherwise generate new synthetic names.
If this denotation does not exist, fallback to alternative
If this denotation does not exist, fallback to alternative
Return symbol in this denotation that satisfies the given predicate. if generateStubs is specified, return a stubsymbol if denotation is a missing ref.
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.
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.
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.
The signature of the denotation.
The signature of the denotation.
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.
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.
The period during which this denotation is valid.
The period during which this denotation is valid.
Form a choice between this denotation and that one.
Form a choice between this denotation and that one.