trait TypeAssigner

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 assignment method. Each method takes as parameters - an untpd.Tree to which it assigns a type, - typed child trees it needs to access to cpmpute th...

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

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
def assignType ( tree: PolyTypeTree , tparamDefs: List [ TypeDef ] , body: Tree ) ( implicit ctx: Context ) : PolyTypeTree
def assignType ( tree: ByNameTypeTree , result: Tree ) ( implicit ctx: Context ) : ByNameTypeTree
def assignType ( tree: TypeBoundsTree , lo: Tree , hi: Tree ) ( implicit ctx: Context ) : TypeBoundsTree
def assignType ( tree: Bind , sym: Symbol ) ( implicit ctx: Context ) : Bind
def assignType ( tree: Alternative , trees: List [ Tree ] ) ( implicit ctx: Context ) : Alternative
def assignType ( tree: UnApply , proto: Type ) ( implicit ctx: Context ) : UnApply
def assignType ( tree: ValDef , sym: Symbol ) ( implicit ctx: Context ) : ValDef
def assignType ( tree: DefDef , sym: Symbol ) ( implicit ctx: Context ) : DefDef
def assignType ( tree: TypeDef , sym: Symbol ) ( implicit ctx: Context ) : TypeDef
def assignType ( tree: Import , sym: Symbol ) ( implicit ctx: Context ) : Import
def assignType ( tree: Annotated , arg: Tree , annot: Tree ) ( implicit ctx: Context ) : Annotated
def assignType ( tree: PackageDef , pid: Tree ) ( implicit ctx: Context ) : PackageDef
def assignType$default$4 : NoSymbol$
def avoid ( tp: Type , symsToAvoid: => List [ Symbol ] ) ( implicit ctx: Context ) : Type

An upper approximation of the given type tp that does not refer to any symbol in symsToAvoid. Approximation steps are:

  • follow aliases and upper bounds if the original refers to a forbidden symbol
  • widen termrefs that refer to a forbidden symbol
  • replace ClassInfos of forbidden classes by the intersection of their parents, refined by all non-private fields, methods, and type members.
  • if the prefix of a class refers to a forbidden symbol, first try to replace the prefix, if this is not possible, replace the ClassInfo as above.
  • drop refinements referring to a forbidden symbol.
def avoidingType ( expr: Tree , bindings: List [ Tree ] ) ( implicit ctx: Context ) : Type
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...

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