TypeAssigner

object TypeAssigner extends TypeAssigner
Companion
class
class Object
trait Matchable
class Any

Value members

Inherited methods

def accessibleType(tpe: Type, superAccess: Boolean)(using Context): Type

If tpe is a named type, return the type with those alternatives as denotations which are accessible (or NoType, if no alternatives are accessible).

If tpe is a named type, return the type with those alternatives as denotations which are accessible (or NoType, if no alternatives are accessible).

Also performs the following normalizations on the type tpe. (1) if the owner of the denotation is a package object, it is assured that the package object shows up as the prefix. (2) in Java compilation units, Object is replaced by defn.FromJavaObjectType

Inherited from
TypeAssigner
def arrayToRepeated(tree: Tree)(using Context): Tree
Inherited from
TypeAssigner
Inherited from
TypeAssigner
def assignType(tree: PackageDef, pid: Tree)(using Context): PackageDef
Inherited from
TypeAssigner
def assignType(tree: Annotated, arg: Tree, annot: Tree)(using Context): Annotated
Inherited from
TypeAssigner
def assignType(tree: Export)(using Context): Export
Inherited from
TypeAssigner
def assignType(tree: Import, sym: Symbol)(using Context): Import
Inherited from
TypeAssigner
def assignType(tree: TypeDef, sym: Symbol)(using Context): TypeDef
Inherited from
TypeAssigner
def assignType(tree: DefDef, sym: Symbol)(using Context): DefDef
Inherited from
TypeAssigner
def assignType(tree: ValDef, sym: Symbol)(using Context): ValDef
Inherited from
TypeAssigner
def assignType(tree: UnApply, proto: Type)(using Context): UnApply
Inherited from
TypeAssigner
def assignType(tree: Alternative, trees: List[Tree])(using Context): Alternative
Inherited from
TypeAssigner
def assignType(tree: Bind, sym: Symbol)(using Context): Bind
Inherited from
TypeAssigner
def assignType(tree: TypeBoundsTree, lo: Tree, hi: Tree, alias: Tree)(using Context): TypeBoundsTree
Inherited from
TypeAssigner
def assignType(tree: ByNameTypeTree, result: Tree)(using Context): ByNameTypeTree
Inherited from
TypeAssigner
def assignType(tree: MatchTypeTree, bound: Tree, scrutinee: Tree, cases: List[CaseDef])(using Context): MatchTypeTree
Inherited from
TypeAssigner
def assignType(tree: LambdaTypeTree, tparamDefs: List[TypeDef], body: Tree)(using Context): LambdaTypeTree
Inherited from
TypeAssigner
def assignType(tree: AppliedTypeTree, tycon: Tree, args: List[Tree])(using Context): AppliedTypeTree
Inherited from
TypeAssigner
def assignType(tree: RefinedTypeTree, parent: Tree, refinements: List[Tree], refineCls: ClassSymbol)(using Context): RefinedTypeTree

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.

Inherited from
TypeAssigner
def assignType(tree: SeqLiteral, elems: List[Tree], elemtpt: Tree)(using Context): SeqLiteral
Inherited from
TypeAssigner
def assignType(tree: Try, expr: Tree, cases: List[CaseDef])(using Context): Try
Inherited from
TypeAssigner
def assignType(tree: WhileDo)(using Context): WhileDo
Inherited from
TypeAssigner
def assignType(tree: Return)(using Context): Return
Inherited from
TypeAssigner
def assignType(tree: Labeled)(using Context): Labeled
Inherited from
TypeAssigner
def assignType(tree: Match, scrutinee: Tree, cases: List[CaseDef])(using Context): Match
Inherited from
TypeAssigner
def assignType(tree: CaseDef, pat: Tree, body: Tree)(using Context): CaseDef
Inherited from
TypeAssigner
def assignType(tree: Closure, meth: Tree, target: Tree)(using Context): Closure
Inherited from
TypeAssigner
def assignType(tree: If, thenp: Tree, elsep: Tree)(using Context): If
Inherited from
TypeAssigner
def assignType(tree: Inlined, bindings: List[Tree], expansion: Tree)(using Context): Inlined
Inherited from
TypeAssigner
def assignType(tree: Block, stats: List[Tree], expr: Tree)(using Context): Block
Inherited from
TypeAssigner
def assignType(tree: Assign)(using Context): Assign
Inherited from
TypeAssigner
def assignType(tree: NamedArg, arg: Tree)(using Context): NamedArg
Inherited from
TypeAssigner
def assignType(tree: Typed, tpt: Tree)(using Context): Typed
Inherited from
TypeAssigner
def assignType(tree: TypeApply, fn: Tree, args: List[Tree])(using Context): TypeApply
Inherited from
TypeAssigner
def assignType(tree: Apply, fn: Tree, args: List[Tree])(using Context): Apply
Inherited from
TypeAssigner
def assignType(tree: Super, qual: Tree, mixinClass: Symbol)(using Context): Super
Inherited from
TypeAssigner
def assignType(tree: This)(using Context): This
Inherited from
TypeAssigner
def assignType(tree: Literal)(using Context): Literal
Inherited from
TypeAssigner
def assignType(tree: New, tpt: Tree)(using Context): New
Inherited from
TypeAssigner
def assignType(tree: Select, qual: Tree)(using Context): Select
Inherited from
TypeAssigner
def assignType(tree: Select, tp: Type)(using Context): Select
Inherited from
TypeAssigner
def assignType(tree: Ident, tp: Type)(using Context): Ident

Type assignment method. Each method takes as parameters

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 that type,
  • any further information it needs to access to compute that type.
Inherited from
TypeAssigner
Inherited from
TypeAssigner
def avoidingType(expr: Tree, bindings: List[Tree])(using Context): Type
Inherited from
TypeAssigner
def ensureAccessible(tpe: Type, superAccess: Boolean, pos: SrcPos)(using Context): Type

Try to make tpe accessible, emit error if not possible

Try to make tpe accessible, emit error if not possible

Inherited from
TypeAssigner
def inaccessibleErrorType(tpe: NamedType, superAccess: Boolean, pos: SrcPos)(using Context): Type
Inherited from
TypeAssigner
def maybeSkolemizePrefix(qualType: Type, name: Name)(using Context): Type

Return a potentially skolemized version of qualTpe to be used as a prefix when selecting name.

Return a potentially skolemized version of qualTpe to be used as a prefix when selecting name.

See also

QualSkolemType, TypeOps#asSeenFrom

Inherited from
TypeAssigner
def notAMemberErrorType(tree: Select, qual: Tree)(using Context): ErrorType
Inherited from
TypeAssigner
def qualifyingClass(tree: Tree, qual: Name, packageOK: Boolean)(using 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).

Value Params
packageOk

The qualifier may refer to a package.

Inherited from
TypeAssigner
final def reallyExists(denot: Denotation)(using Context): Boolean

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

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

Inherited from
TypeAssigner
def safeSubstParam(tp: Type, pref: ParamRef, argType: Type)(using 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.

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

Inherited from
TypeAssigner
def safeSubstParams(tp: Type, params: List[ParamRef], argTypes: List[Type])(using Context): Type

Substitute types of all arguments args for corresponding params in tp. The number of parameters params may exceed the number of arguments. In this case, only the common prefix is substituted.

Substitute types of all arguments args for corresponding params in tp. The number of parameters params may exceed the number of arguments. In this case, only the common prefix is substituted.

Inherited from
TypeAssigner
def selectionType(tree: RefTree, qual1: Tree)(using Context): Type

The type of the selection tree, where qual1 is the typed qualifier part.

The type of the selection tree, where qual1 is the typed qualifier part.

Inherited from
TypeAssigner
def seqToRepeated(tree: Tree)(using Context): Tree
Inherited from
TypeAssigner
def typeOfNew(tpt: Tree)(using Context): Type

Normalize type T appearing in a new T by following eta expansions to avoid higher-kinded types.

Normalize type T appearing in a new T by following eta expansions to avoid higher-kinded types.

Inherited from
TypeAssigner