dotty.tools.dotc.core

Denotations

Related Doc: package core

object Denotations

Denotations represent the meaning of symbols and named types. The following diagram shows how the principal types of denotations and their denoting entities relate to each other. Lines ending in a down-arrow v are member methods. The two methods shown in the diagram are "symbol" and "deref". Both methods are parameterized by the current context, and are effectively indexed by current period.

Lines ending in a horizontal line mean subtying (right is a subtype of left).

NamedType------TermRefWithSignature | | Symbol---------ClassSymbol | | | | | denot | denot | denot | denot v v v v Denotation-+-----SingleDenotation-+------SymDenotation-+----ClassDenotation | | +-----MultiDenotation | | +--UniqueRefDenotation +--JointRefDenotation

Here's a short summary of the classes in this diagram.

NamedType A type consisting of a prefix type and a name, with fields prefix: Type name: Name It has two subtypes: TermRef and TypeRef TermRefWithSignature A TermRef that has in addition a signature to select an overloaded variant, with new field sig: Signature Symbol A label for a definition or declaration in one compiler run ClassSymbol A symbol representing a class Denotation The meaning of a named type or symbol during a period MultiDenotation A denotation representing several overloaded members SingleDenotation A denotation representing a non-overloaded member or definition, with main fields symbol: Symbol info: Type UniqueRefDenotation A denotation referring to a single definition with some member type JointRefDenotation A denotation referring to a member that could resolve to several definitions SymDenotation A denotation representing a single definition with its original type, with main fields name: Name owner: Symbol flags: Flags privateWithin: Symbol annotations: List[Annotation] ClassDenotation A denotation representing a single class definition.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Denotations
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final case class DenotUnion(denots1: PreDenotation, denots2: PreDenotation) extends PreDenotation with Product with Serializable

  2. abstract class Denotation extends DotClass with Showable

    A denotation is the result of resolving a name (either simple identifier or select) during a given period.

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

  3. trait DenotationsBase extends AnyRef

  4. class ErrorDenotation extends NonSymSingleDenotation

  5. class JointRefDenotation extends NonSymSingleDenotation

  6. case class MissingRef(owner: SingleDenotation, name: Name)(implicit ctx: Context) extends ErrorDenotation with Product with Serializable

    An error denotation that provides more info about the missing reference.

    An error denotation that provides more info about the missing reference. Produced by staticRef, consumed by requiredSymbol.

  7. case class MultiDenotation(denot1: Denotation, denot2: Denotation) extends Denotation with Product with Serializable

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

  8. case class NoQualifyingRef(alts: List[SingleDenotation])(implicit ctx: Context) extends ErrorDenotation with Product with Serializable

    An error denotation that provides more info about alternatives that were found but that do not qualify.

    An error denotation that provides more info about alternatives that were found but that do not qualify. Produced by staticRef, consumed by requiredSymbol.

  9. abstract class NonSymSingleDenotation extends SingleDenotation

  10. class NotDefinedHere extends Exception

  11. trait PreDenotation extends AnyRef

    A PreDenotation represents a group of single denotations It is used as an optimization to avoid forming MultiDenotations too eagerly.

  12. abstract class SingleDenotation extends Denotation with PreDenotation

    A non-overloaded denotation

  13. class StaleSymbol extends Exception

    An exception for accessing symbols that are no longer valid in current run

  14. class UniqueRefDenotation extends NonSymSingleDenotation

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def doubleDefError(denot1: Denotation, denot2: Denotation, pre: Type = NoPrefix)(implicit ctx: Context): Nothing

  7. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. implicit def eqDenotation: Eq[Denotation, Denotation]

  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. def isDoubleDef(sym1: Symbol, sym2: Symbol)(implicit ctx: Context): Boolean

    A double definition

  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. def toString(): String

    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped