abstract class NamedType
extends CachedProxyType with ValueType

A NamedType of the form Prefix # name

Constructors

NamedType ( )

Members

type ThisType = NamedType <: NamedType
private var checkedPeriod : Period
private var lastDenotation : Denotation
private var lastSymbol : Symbol
val name : Name
val prefix : Type
protected def asMemberOf ( prefix: Type , allowPrivate: Boolean ) ( implicit ctx: Context ) : Denotation
final def checkDenot ( ) ( implicit ctx: Context ) : Unit

Hook for adding debug check code when denotations are assigned

Hook for adding debug check code when denotations are assigned

private def checkSymAssign ( sym: Symbol ) ( implicit ctx: Context ) : Unit
private def computeDenot ( implicit ctx: Context ) : Denotation

A second fallback to recompute the denotation if necessary

A second fallback to recompute the denotation if necessary

[+] final def controlled ( op: => T ) ( implicit ctx: Context ) : T

Guard against cycles that can arise if given op follows info. The problematic cases are a type alias to itself or bounded by itself or a val typed as it...

Guard against cycles that can arise if given op follows info. The problematic cases are a type alias to itself or bounded by itself or a val typed as itself:

type T <: T val x: x.type

These are errors but we have to make sure that operations do not loop before the error is detected.

[+] def currentSymbol ( implicit ctx: Context ) : Symbol

The denotation is current, its symbol, otherwise NoDenotation.

Note: This operation does not force the denotation, and is therefore timing dependent. It...

The denotation is current, its symbol, otherwise NoDenotation.

Note: This operation does not force the denotation, and is therefore timing dependent. It should only be used if the outcome of the essential computation does not depend on the symbol being present or not. It's currently used to take an optimized path in substituters and type accumulators, as well as to be safe in diagnostic printing. Normally, it's better to use symbol, not currentSymbol.

final def denot ( implicit ctx: Context ) : Denotation

The denotation currently denoted by this type

The denotation currently denoted by this type

private def denotAt ( now: Period ) ( implicit ctx: Context ) : Denotation

A first fall back to do a somewhat more expensive calculation in case the first attempt in denot does not yield a denotation.

A first fall back to do a somewhat more expensive calculation in case the first attempt in denot does not yield a denotation.

private def denotOfSym ( sym: Symbol ) ( implicit ctx: Context ) : Denotation
def denotationIsCurrent ( implicit ctx: Context ) : Boolean

There is a denotation computed which is valid (somewhere in) the current run.

There is a denotation computed which is valid (somewhere in) the current run.

[+] def derivedSelect ( prefix: Type ) ( implicit ctx: Context ) : Type

A selection of the same kind, but with potentially a different prefix. The following normalizations are performed for type selections T#A:

T#A --> B...

A selection of the same kind, but with potentially a different prefix. The following normalizations are performed for type selections T#A:

T#A --> B if A is bound to an alias = B in T

If Config.splitProjections is set:

(S & T)#A --> S#A if T does not have a member named A --> T#A if S does not have a member named A --> S#A & T#A otherwise (S | T)#A --> S#A | T#A

override def equals ( that: Any ) : Boolean
def info ( implicit ctx: Context ) : Type
def isTerm : Boolean
def isType : Boolean
protected def loadDenot ( implicit ctx: Context ) : Denotation
def newLikeThis ( prefix: Type ) ( implicit ctx: Context ) : NamedType

Create a NamedType of the same kind as this type, but with a new prefix.

Create a NamedType of the same kind as this type, but with a new prefix.

private def recomputeMember ( d: SymDenotation ) ( implicit ctx: Context ) : Denotation

A member of prefix (disambiguated by d.signature) or, if none was found, d.current.

A member of prefix (disambiguated by d.signature) or, if none was found, d.current.

[+] def reduceProjection ( implicit ctx: Context ) : Type

(1) Reduce a type-ref W # X or W { ... } # U, where W is a wildcard type to an (unbounded) wildcard type.

(2) Reduce a type-ref T { X = U; ... } # X to...

(1) Reduce a type-ref W # X or W { ... } # U, where W is a wildcard type to an (unbounded) wildcard type.

(2) Reduce a type-ref T { X = U; ... } # X to U provided U does not refer with a RecThis to the refinement type T { X = U; ... }

final def setDenot ( denot: Denotation ) ( implicit ctx: Context ) : Unit
final def setSym ( sym: Symbol ) ( implicit ctx: Context ) : Unit
[+] def shadowed ( implicit ctx: Context ) : NamedType

Create a NamedType of the same kind as this type, but with a "inherited name". This is necessary to in situations like the following:

class B { def m: T...

Create a NamedType of the same kind as this type, but with a "inherited name". This is necessary to in situations like the following:

class B { def m: T1 } class C extends B { private def m: T2; ... C.m } object C extends C object X { ... C.m }

The two references of C.m in class C and object X refer to different definitions: The one in C refers to C#m whereas the one in X refers to B#m. But the type C.m must have only one denotation, so it can't refer to two members depending on context.

In situations like this, the reference in X would get the type <C.m>.shadowed to make clear that we mean the inherited member, not the private one.

Note: An alternative, possibly more robust scheme would be to give private members special names. A private definition would have a special name (say m' in the example above), but would be entered in its enclosing under both private and public names, so it could still be found by looking up the public name.

protected def sig : Signature
[+] def stableInRunSymbol ( implicit ctx: Context ) : Symbol

Retrieves currently valid symbol without necessarily updating denotation. Assumes that symbols do not change between periods in the same run. Used to ge...

Retrieves currently valid symbol without necessarily updating denotation. Assumes that symbols do not change between periods in the same run. Used to get the class underlying a ThisType.

def symbol ( implicit ctx: Context ) : Symbol
final def uncheckedSetSym ( sym: Symbol ) : Unit
def withDenot ( denot: Denotation ) ( implicit ctx: Context ) : ThisType
private def withSig ( sig: Signature ) ( implicit ctx: Context ) : NamedType
def withSym ( sym: Symbol , signature: Signature ) ( implicit ctx: Context ) : ThisType