Dotty Documentation

0.4.0-bin-SNAPSHOT

trait TypeAssigner

[-] Constructors

[-] Members

[+] def accessibleSelectionType ( tree: RefTree , qual1: Tree ) ( implicit ctx: Context ) : Type

The selection type, which is additionally checked for accessibility.

[+] def assertExists ( tp: Type ) : Type
[+] def assignType ( tree: Ident , tp: Type ) ( implicit ctx: Context ) : Ident [ Type ]
[+] def assignType ( tree: Select , qual: Tree ) ( implicit ctx: Context ) : Select
[+] def assignType ( tree: New , tpt: Tree ) ( implicit ctx: Context ) : New [ Type ]
[+] def assignType ( tree: Literal ) ( implicit ctx: Context ) : Literal [ Type ]
[+] def assignType ( tree: This ) ( implicit ctx: Context ) : This [ Type ]
[+] def assignType ( tree: Super , qual: Tree , inConstrCall: Boolean , mixinClass: Symbol ) ( implicit ctx: Context ) : Super [ Type ]
[+] def assignType ( tree: Apply , fn: Tree , args: List [ Tree ] ) ( implicit ctx: Context ) : Apply [ Type ]
[+] def assignType ( tree: TypeApply , fn: Tree , args: List [ Tree ] ) ( implicit ctx: Context ) : TypeApply [ Type ]
[+] def assignType ( tree: Typed , tpt: Tree ) ( implicit ctx: Context ) : Typed [ Type ]
[+] def assignType ( tree: NamedArg , arg: Tree ) ( implicit ctx: Context ) : NamedArg [ Type ]
[+] def assignType ( tree: Assign ) ( implicit ctx: Context ) : Assign [ Type ]
[+] def assignType ( tree: Block , stats: List [ Tree ] , expr: Tree ) ( implicit ctx: Context ) : Block [ Type ]
[+] def assignType ( tree: Inlined , bindings: List [ Tree ] , expansion: Tree ) ( implicit ctx: Context ) : Inlined [ Type ]
[+] def assignType ( tree: If , thenp: Tree , elsep: Tree ) ( implicit ctx: Context ) : If [ Type ]
[+] def assignType ( tree: Closure , meth: Tree , target: Tree ) ( implicit ctx: Context ) : Closure [ Type ]
[+] def assignType ( tree: CaseDef , body: Tree ) ( implicit ctx: Context ) : CaseDef [ Type ]
[+] def assignType ( tree: Match , cases: List [ CaseDef ] ) ( implicit ctx: Context ) : Match [ Type ]
[+] def assignType ( tree: Return ) ( implicit ctx: Context ) : Return [ Type ]
[+] def assignType ( tree: Try , expr: Tree , cases: List [ CaseDef ] ) ( implicit ctx: Context ) : Try [ Type ]
[+] def assignType ( tree: SeqLiteral , elems: List [ Tree ] , elemtpt: Tree ) ( implicit ctx: Context ) : SeqLiteral [ Type ]
[+] def assignType ( tree: SingletonTypeTree , ref: Tree ) ( implicit ctx: Context ) : SingletonTypeTree [ Type ]
[+] def assignType ( tree: AndTypeTree , left: Tree , right: Tree ) ( implicit ctx: Context ) : AndTypeTree [ Type ]
[+] def assignType ( tree: OrTypeTree , left: Tree , right: Tree ) ( implicit ctx: Context ) : OrTypeTree [ Type ]
[+] def assignType ( tree: RefinedTypeTree , parent: Tree , refinements: List [ Tree ] , refineCls: ClassSymbol ) ( implicit ctx: Context ) : RefinedTypeTree [ Type ]

Assign type of RefinedType. Refinements are typed as if they were members of refinement class refineCls.

[+] def assignType ( tree: AppliedTypeTree , tycon: Tree , args: List [ Tree ] ) ( implicit ctx: Context ) : AppliedTypeTree [ Type ]
[+] def assignType ( tree: LambdaTypeTree , tparamDefs: List [ TypeDef ] , body: Tree ) ( implicit ctx: Context ) : LambdaTypeTree [ Type ]
[+] def assignType ( tree: ByNameTypeTree , result: Tree ) ( implicit ctx: Context ) : ByNameTypeTree [ Type ]
[+] def assignType ( tree: TypeBoundsTree , lo: Tree , hi: Tree ) ( implicit ctx: Context ) : TypeBoundsTree [ Type ]
[+] def assignType ( tree: Bind , sym: Symbol ) ( implicit ctx: Context ) : Bind [ Type ]
[+] def assignType ( tree: Alternative , trees: List [ Tree ] ) ( implicit ctx: Context ) : Alternative [ Type ]
[+] def assignType ( tree: UnApply , proto: Type ) ( implicit ctx: Context ) : UnApply [ Type ]
[+] def assignType ( tree: ValDef , sym: Symbol ) ( implicit ctx: Context ) : ValDef [ Type ]
[+] def assignType ( tree: DefDef , sym: Symbol ) ( implicit ctx: Context ) : DefDef [ Type ]
[+] def assignType ( tree: TypeDef , sym: Symbol ) ( implicit ctx: Context ) : TypeDef [ Type ]
[+] def assignType ( tree: Import , sym: Symbol ) ( implicit ctx: Context ) : Import [ Type ]
[+] def assignType ( tree: Annotated , arg: Tree , annot: Tree ) ( implicit ctx: Context ) : Annotated [ Type ]
[+] def assignType ( tree: PackageDef , pid: Tree ) ( implicit ctx: Context ) : PackageDef [ Type ]
[+] def avoid ( tp: Type , symsToAvoid: => List [ Symbol ] ) ( implicit ctx: Context ) : Type
[+] def avoidPrivateLeaks ( sym: Symbol , pos: Position ) ( implicit ctx: Context ) : Type
[+] def avoidingType ( expr: Tree , bindings: List [ Tree ] ) ( implicit ctx: Context ) : Type
[+] def classBound ( info: ClassInfo ) ( implicit ctx: Context ) : Type

Given a class info, the intersection of its parents, refined by all non-private fields, methods, and type members.

[+] def ensureAccessible ( tpe: Type , superAccess: Boolean , pos: Position ) ( implicit ctx: Context ) : Type

If tpe is a named type, check that its denotation is accessible in the current context. Return the type with those alternatives as denotations which are accessible.

Also performs the following normalizations on the type tpe. (1) parameter accessors are always dereferenced. (2) if the owner of the denotation is a package object, it is assured that the package object shows up as the prefix.

[+] private def inSameUniverse ( op: (Type, Type) => Type , tp1: Type , tree2: Tree , relationship: => String ) ( implicit ctx: Context ) : Type

Ensure that tree2's type is in the same universe as tree1. If that's the case, return op applied to both types. If not, issue an error and return tree1's type.

[+] private def lubInSameUniverse ( trees: List [ Tree ] , relationship: => String ) ( implicit ctx: Context ) : Type
[+] def qualifyingClass ( tree: Tree , qual: Name , packageOK: Boolean ) ( implicit ctx: Context ) : Symbol

The qualifying class of a this or super with prefix qual (which might be empty).

[+] final def reallyExists ( denot: Denotation ) ( implicit ctx: Context ) : Boolean

A denotation exists really if it exists and does not point to a stale symbol.

[+] def safeSubstParam ( tp: Type , pref: ParamRef , argType: Type ) ( implicit ctx: Context ) : Type

Substitute argument type argType for parameter pref in type tp, skolemizing the argument type if it is not stable and pref occurs in tp.

[+] def selectionType ( site: Type , name: Name , pos: Position ) ( implicit ctx: Context ) : Type

The type of a selection with name of a tree with type site.

[+] def seqToRepeated ( tree: Tree ) ( implicit ctx: Context ) : Tree
[+] private def symbolicIfNeeded ( sym: Symbol ) ( implicit ctx: Context ) : CachedType & Product