trait TypeAssigner

Constructors

Members

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

The selection type, which is additionally checked for accessibility.

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.

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

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 avoidPrivateLeaks ( sym: Symbol , pos: Position ) ( implicit ctx: Context ) : Type
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...

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.

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

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.

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 ) : TypeRef | TermRef | NoType$