dotty.tools.dotc.typer

Typer

Related Docs: object Typer | package typer

class Typer extends Namer with TypeAssigner with Applications with Implicits with Dynamic with Checking

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Typer
  2. Checking
  3. Dynamic
  4. Implicits
  5. Applications
  6. Compatibility
  7. TypeAssigner
  8. Namer
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Typer()

Type Members

  1. class ApplicableToTrees extends (Applications.this)#TestApplication[ast.tpd.Tree]

    Subclass of Application for applicability tests with type arguments and value argument trees.

    Subclass of Application for applicability tests with type arguments and value argument trees.

    Definition Classes
    Applications
  2. class ApplicableToTreesDirectly extends (Applications.this)#ApplicableToTrees

    Subclass of Application for applicability tests with type arguments and value argument trees.

    Subclass of Application for applicability tests with type arguments and value argument trees.

    Definition Classes
    Applications
  3. class ApplicableToTypes extends (Applications.this)#TestApplication[Type]

    Subclass of Application for applicability tests with value argument types.

    Subclass of Application for applicability tests with value argument types.

    Definition Classes
    Applications
  4. abstract class Application[Arg] extends AnyRef

    Arg

    the type of arguments, could be tpd.Tree, untpd.Tree, or Type

    Definition Classes
    Applications
  5. class ApplyToTyped extends (Applications.this)#TypedApply[Type]

    Subclass of Application for type checking an Apply node with typed arguments.

    Subclass of Application for type checking an Apply node with typed arguments.

    Definition Classes
    Applications
  6. class ApplyToUntyped extends (Applications.this)#TypedApply[Untyped]

    Subclass of Application for type checking an Apply node with untyped arguments.

    Subclass of Application for type checking an Apply node with untyped arguments.

    Definition Classes
    Applications
  7. class ClassCompleter extends Typer.Completer

    Definition Classes
    Namer
  8. class Completer extends LazyType

    The completer of a symbol defined by a member def or import (except ClassSymbols)

    The completer of a symbol defined by a member def or import (except ClassSymbols)

    Definition Classes
    Namer
  9. final class ExplainedImplicitSearch extends Typer.ImplicitSearch

    Definition Classes
    Implicits
  10. class ImplicitSearch extends AnyRef

    An implicit search; parameters as in inferImplicit

    An implicit search; parameters as in inferImplicit

    Definition Classes
    Implicits
  11. abstract class TestApplication[Arg] extends (Applications.this)#Application[Arg]

    Subclass of Application for the cases where we are interested only in a "can/cannot apply" answer, without needing to construct trees or issue error messages.

    Subclass of Application for the cases where we are interested only in a "can/cannot apply" answer, without needing to construct trees or issue error messages.

    Definition Classes
    Applications
  12. class TypeDefCompleter extends Typer.Completer with TypeParamsCompleter

    Definition Classes
    Namer
  13. abstract class TypedApply[T >: Untyped] extends (Applications.this)#Application[Tree[T]]

    Subclass of Application for type checking an Apply node, where types of arguments are either known or unknown.

    Subclass of Application for type checking an Apply node, where types of arguments are either known or unknown.

    Definition Classes
    Applications

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. val ExpandedTree: Key[ast.untpd.Tree]

    Definition Classes
    Namer
  5. val SymOfTree: Key[Symbol]

    Definition Classes
    Namer
  6. val TypedAhead: Key[ast.tpd.Tree]

    Definition Classes
    Namer
  7. def accessibleSelectionType(tree: ast.untpd.RefTree, qual1: ast.tpd.Tree)(implicit ctx: Context): Type

    The selection type, which is additionally checked for accessibility.

    The selection type, which is additionally checked for accessibility.

    Definition Classes
    TypeAssigner
  8. def adapt(tree: ast.tpd.Tree, pt: Type, original: ast.untpd.Tree = untpd.EmptyTree)(implicit ctx: Context): ast.tpd.Tree

  9. def adaptInterpolated(tree: ast.tpd.Tree, pt: Type, original: ast.untpd.Tree)(implicit ctx: Context): ast.tpd.Tree

    Perform the following adaptations of expression, pattern or type tree wrt to given prototype pt: (1) Resolve overloading (2) Apply parameterless functions (3) Apply polymorphic types to fresh instances of their type parameters and store these instances in context.undetparams, unless followed by explicit type application.

    Perform the following adaptations of expression, pattern or type tree wrt to given prototype pt: (1) Resolve overloading (2) Apply parameterless functions (3) Apply polymorphic types to fresh instances of their type parameters and store these instances in context.undetparams, unless followed by explicit type application. (4) Do the following to unapplied methods used as values: (4.1) If the method has only implicit parameters pass implicit arguments (4.2) otherwise, if pt is a function type and method is not a constructor, convert to function by eta-expansion, (4.3) otherwise, if the method is nullary with a result type compatible to pt and it is not a constructor, apply it to () otherwise issue an error (5) Convert constructors in a pattern as follows: (5.1) If constructor refers to a case class factory, set tree's type to the unique instance of its primary constructor that is a subtype of the expected type. (5.2) If constructor refers to an extractor, convert to application of unapply or unapplySeq method.

    (6) Convert all other types to TypeTree nodes. (7) When in TYPEmode but not FUNmode or HKmode, check that types are fully parameterized (7.1) In HKmode, higher-kinded types are allowed, but they must have the expected kind-arity (8) When in both EXPRmode and FUNmode, add apply method calls to values of object type. (9) If there are undetermined type variables and not POLYmode, infer expression instance Then, if tree's type is not a subtype of expected type, try the following adaptations: (10) If the expected type is Byte, Short or Char, and the expression is an integer fitting in the range of that type, convert it to that type. (11) Widen numeric literals to their expected type, if necessary (12) When in mode EXPRmode, convert E to { E; () } if expected type is scala.Unit. (13) When in mode EXPRmode, apply AnnotationChecker conversion if expected type is annotated. (14) When in mode EXPRmode, apply a view If all this fails, error

  10. def argCtx(app: ast.untpd.Tree)(implicit ctx: Context): Context

    If app is a this(...) constructor call, the this-call argument context, otherwise the current context.

    If app is a this(...) constructor call, the this-call argument context, otherwise the current context.

    Definition Classes
    Applications
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def assertExists(tp: Type): Type

    Definition Classes
    TypeAssigner
  13. def assignType(tree: ast.untpd.PackageDef, pid: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  14. def assignType(tree: ast.untpd.Annotated, arg: ast.tpd.Tree, annot: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  15. def assignType(tree: ast.untpd.Import, sym: Symbol)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  16. def assignType(tree: ast.untpd.TypeDef, sym: Symbol)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  17. def assignType(tree: ast.untpd.DefDef, sym: Symbol)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  18. def assignType(tree: ast.untpd.ValDef, sym: Symbol)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  19. def assignType(tree: ast.untpd.UnApply, proto: Type)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  20. def assignType(tree: ast.untpd.Alternative, trees: List[ast.tpd.Tree])(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  21. def assignType(tree: ast.untpd.Bind, sym: Symbol)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  22. def assignType(tree: ast.untpd.TypeBoundsTree, lo: ast.tpd.Tree, hi: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  23. def assignType(tree: ast.untpd.ByNameTypeTree, result: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  24. def assignType(tree: ast.untpd.TypeLambdaTree, tparamDefs: List[ast.tpd.TypeDef], body: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  25. def assignType(tree: ast.untpd.AppliedTypeTree, tycon: ast.tpd.Tree, args: List[ast.tpd.Tree])(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  26. def assignType(tree: ast.untpd.OrTypeTree, left: ast.tpd.Tree, right: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  27. def assignType(tree: ast.untpd.AndTypeTree, left: ast.tpd.Tree, right: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  28. def assignType(tree: ast.untpd.SingletonTypeTree, ref: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  29. def assignType(tree: ast.untpd.SeqLiteral, elems: List[ast.tpd.Tree], elemtpt: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  30. def assignType(tree: ast.untpd.Try, expr: ast.tpd.Tree, cases: List[ast.tpd.CaseDef])(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  31. def assignType(tree: ast.untpd.Return)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  32. def assignType(tree: ast.untpd.Match, cases: List[ast.tpd.CaseDef])(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  33. def assignType(tree: ast.untpd.CaseDef, body: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  34. def assignType(tree: ast.untpd.Closure, meth: ast.tpd.Tree, target: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  35. def assignType(tree: ast.untpd.If, thenp: ast.tpd.Tree, elsep: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  36. def assignType(tree: ast.untpd.Block, stats: List[ast.tpd.Tree], expr: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  37. def assignType(tree: ast.untpd.Assign)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  38. def assignType(tree: ast.untpd.NamedArg, arg: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  39. def assignType(tree: ast.untpd.Typed, tpt: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  40. def assignType(tree: ast.untpd.Pair, left: ast.tpd.Tree, right: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  41. def assignType(tree: ast.untpd.TypeApply, fn: ast.tpd.Tree, args: List[ast.tpd.Tree])(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  42. def assignType(tree: ast.untpd.Apply, fn: ast.tpd.Tree, args: List[ast.tpd.Tree])(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  43. def assignType(tree: ast.untpd.Super, qual: ast.tpd.Tree, inConstrCall: Boolean, mixinClass: Symbol = NoSymbol)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  44. def assignType(tree: ast.untpd.This)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  45. def assignType(tree: ast.untpd.Literal)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  46. def assignType(tree: ast.untpd.New, tpt: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  47. def assignType(tree: ast.untpd.SelectFromTypeTree, qual: ast.tpd.Tree)(implicit ctx: Context): ThisTree[Type]

    Definition Classes
    TypeAssigner
  48. def assignType(tree: ast.untpd.Select, qual: ast.tpd.Tree)(implicit ctx: Context): ast.tpd.Select

    Definition Classes
    TypeAssigner
  49. def assignType(tree: ast.untpd.Ident, tp: Type)(implicit ctx: Context): ThisTree[Type]

    Type assignment method.

    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.
    Definition Classes
    TypeAssigner
  50. 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.

    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.
    Definition Classes
    TypeAssigner
  51. def checkCanEqual(ltp: Type, rtp: Type, pos: Position)(implicit ctx: Context): Unit

    Check that equality tests between types ltp and rtp make sense

    Check that equality tests between types ltp and rtp make sense

    Definition Classes
    Implicits
  52. def checkClassType(tp: Type, pos: Position, traitReq: Boolean, stablePrefixReq: Boolean)(implicit ctx: Context): Type

    Check that tp is a class type.

    Check that tp is a class type. Also, if traitReq is true, check that tp is a trait. Also, if stablePrefixReq is true and phase is not after RefChecks, check that class prefix is stable.

    returns

    tp itself if it is a class or trait ref, ObjectType if not.

    Definition Classes
    Checking
  53. def checkFeasible(tp: Type, pos: Position, where: ⇒ String = "")(implicit ctx: Context): Type

    Check that any top-level type arguments in this type are feasible, i.e.

    Check that any top-level type arguments in this type are feasible, i.e. that their lower bound conforms to their upper bound. If a type argument is infeasible, issue and error and continue with upper bound.

    Definition Classes
    Checking
  54. def checkImplicitParamsNotSingletons(vparamss: List[List[ast.tpd.ValDef]])(implicit ctx: Context): Unit

    Check that a non-implicit parameter making up the first parameter section of an implicit conversion is not a singleton type.

    Check that a non-implicit parameter making up the first parameter section of an implicit conversion is not a singleton type.

    Definition Classes
    Checking
  55. def checkNoDoubleDefs(cls: Symbol)(implicit ctx: Context): Unit

    Check that class does not define same symbol twice

    Check that class does not define same symbol twice

    Definition Classes
    Checking
  56. def checkNonCyclic(sym: Symbol, info: TypeBounds, reportErrors: Boolean)(implicit ctx: Context): Type

    Definition Classes
    Checking
  57. def checkParentCall(call: ast.tpd.Tree, caller: ClassSymbol)(implicit ctx: Context): Unit

    Definition Classes
    Checking
  58. def checkRealizableBounds(tp: Type, pos: Position)(implicit ctx: Context): Unit

    Check that all type members of tp have realizable bounds

    Check that all type members of tp have realizable bounds

    Definition Classes
    Checking
  59. def checkSimpleKinded(tpt: ast.tpd.Tree)(implicit ctx: Context): ast.tpd.Tree

    Check that tpt does not define a higher-kinded type

    Check that tpt does not define a higher-kinded type

    Definition Classes
    Checking
  60. def checkStable(tp: Type, pos: Position)(implicit ctx: Context): Unit

    Check that type tp is stable.

    Check that type tp is stable.

    Definition Classes
    Checking
  61. def checkValue(tree: ast.tpd.Tree, proto: Type)(implicit ctx: Context): tree.type

    Check that Java statics and packages can only be used in selections.

    Check that Java statics and packages can only be used in selections.

    Definition Classes
    Checking
  62. def checkVariance(tree: ast.tpd.Tree)(implicit ctx: Context): Unit

    Overridden in retyper

  63. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. def completeAnnotations(mdef: ast.untpd.MemberDef, sym: Symbol)(implicit ctx: Context): Unit

  65. def completeParams(params: List[ast.untpd.MemberDef])(implicit ctx: Context): Unit

    Enter and typecheck parameter list

    Enter and typecheck parameter list

    Definition Classes
    Namer
  66. def constrainResult(mt: Type, pt: Type)(implicit ctx: Context): Boolean

    Check that the result type of the current method fits the given expected result type.

    Check that the result type of the current method fits the given expected result type.

    Definition Classes
    Compatibility
  67. def convertNewGenericArray(tree: ast.tpd.Tree)(implicit ctx: Context): ast.tpd.Tree

    Rewrite new Array[T](....) if T is an unbounded generic to calls to newGenericArray.

    Rewrite new Array[T](....) if T is an unbounded generic to calls to newGenericArray. It is performed during typer as creation of generic arrays needs a classTag. we rely on implicit search to find one.

    Definition Classes
    Applications
  68. def createSymbol(tree: ast.untpd.Tree)(implicit ctx: Context): Symbol

    If this tree is a member def or an import, create a symbol of it and store in symOfTree map.

    If this tree is a member def or an import, create a symbol of it and store in symOfTree map.

    Definition Classes
    Namer
  69. def defDefSig(ddef: ast.untpd.DefDef, sym: Symbol)(implicit ctx: Context): Type

    The type signature of a DefDef with given symbol

    The type signature of a DefDef with given symbol

    Definition Classes
    Namer
  70. def enclosingClassNamed(name: TypeName, pos: Position)(implicit ctx: Context): Symbol

    The enclosing class with given name; error if none exists

    The enclosing class with given name; error if none exists

    Definition Classes
    Namer
  71. def encodeName(tree: ast.untpd.NameTree)(implicit ctx: Context): ast.untpd.NameTree

    Attributes
    protected
  72. 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.

    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.

    Definition Classes
    TypeAssigner
  73. def ensureConstrCall(cls: ClassSymbol, parents: List[ast.tpd.Tree])(implicit ctx: Context): List[ast.tpd.Tree]

    If this is a real class, make sure its first parent is a constructor call.

    If this is a real class, make sure its first parent is a constructor call. Cannot simply use a type. Overridden in ReTyper.

  74. def ensureFirstIsClass(parents: List[ast.tpd.Tree], pos: Position)(implicit ctx: Context): List[ast.tpd.Tree]

    Ensure that first parent tree refers to a real class.

  75. def ensureFirstIsClass(parents: List[Type])(implicit ctx: Context): List[Type]

    Ensure that the first type in a list of parent types Ps points to a non-trait class.

    Ensure that the first type in a list of parent types Ps points to a non-trait class. If that's not already the case, add one. The added class type CT is determined as follows. First, let C be the unique class such that

    • there is a parent P_i such that P_i derives from C, and
    • for every class D: If some parent P_j, j <= i derives from D, then C derives from D. Then, let CT be the smallest type which
    • has C as its class symbol, and
    • for all parents P_i: If P_i derives from C then P_i <:< CT.
  76. def ensureNoLocalRefs(tree: ast.tpd.Tree, pt: Type, localSyms: ⇒ List[Symbol], forcedDefined: Boolean = false)(implicit ctx: Context): ast.tpd.Tree

    Check that expression's type can be expressed without references to locally defined symbols.

    Check that expression's type can be expressed without references to locally defined symbols. The following two remedies are tried before giving up:

    1. If the expected type of the expression is fully defined, pick it as the type of the result expressed by adding a type ascription. 2. If (1) fails, force all type variables so that the block's type is fully defined and try again.
    Attributes
    protected
  77. def enterSymbol(sym: Symbol)(implicit ctx: Context): Symbol

    If sym exists, enter it in effective scope.

    If sym exists, enter it in effective scope. Check that package members are not entered twice in the same run.

    Definition Classes
    Namer
  78. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  79. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  80. def escapingRefs(block: ast.tpd.Tree, localSyms: ⇒ List[Symbol])(implicit ctx: Context): Set[NamedType]

  81. def expand(tree: ast.untpd.Tree)(implicit ctx: Context): Unit

    Expand tree and store in expandedTree

    Expand tree and store in expandedTree

    Definition Classes
    Namer
  82. def expanded(tree: ast.untpd.Tree)(implicit ctx: Context): ast.untpd.Tree

    The expanded version of this tree, or tree itself if not expanded

    The expanded version of this tree, or tree itself if not expanded

    Definition Classes
    Namer
  83. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  84. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  85. def handleUnexpectedFunType(tree: ast.untpd.Apply, fun: ast.tpd.Tree)(implicit ctx: Context): ast.tpd.Tree

    Overridden in ReTyper to handle primitive operations that can be generated after erasure

    Overridden in ReTyper to handle primitive operations that can be generated after erasure

    Attributes
    protected
    Definition Classes
    Applications
  86. def harmonize(trees: List[ast.tpd.Tree])(implicit ctx: Context): List[ast.tpd.Tree]

    If trees all have numeric value types, and they do not have all the same type, pick a common numeric supertype and convert all trees to this type.

    If trees all have numeric value types, and they do not have all the same type, pick a common numeric supertype and convert all trees to this type.

    Definition Classes
    Applications
  87. def harmonizeTypes(tpes: List[Type])(implicit ctx: Context): List[Type]

    If all types are numeric value types, and they are not all the same type, pick a common numeric supertype and return it instead of every original type.

    If all types are numeric value types, and they are not all the same type, pick a common numeric supertype and return it instead of every original type.

    Definition Classes
    Applications
  88. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  89. def importContext(sym: Symbol, selectors: List[ast.untpd.Tree])(implicit ctx: Context): FreshContext

    A new context that summarizes an import statement

    A new context that summarizes an import statement

    Definition Classes
    Namer
  90. def inClassContext(selfInfo: DotClass)(implicit ctx: Context): Context

    A new context for the interior of a class

    A new context for the interior of a class

    Definition Classes
    Namer
  91. def index(stats: List[ast.untpd.Tree])(implicit ctx: Context): Context

    Create top-level symbols for statements and enter them into symbol table

    Create top-level symbols for statements and enter them into symbol table

    Definition Classes
    Namer
  92. def index(stat: ast.untpd.Tree)(implicit ctx: Context): Context

    Expand tree and create top-level symbols for statement and enter them into symbol table

    Expand tree and create top-level symbols for statement and enter them into symbol table

    Definition Classes
    Namer
  93. def indexExpanded(stat: ast.untpd.Tree)(implicit ctx: Context): Context

    Create top-level symbols for all statements in the expansion of this statement and enter them into symbol table

    Create top-level symbols for all statements in the expansion of this statement and enter them into symbol table

    Definition Classes
    Namer
  94. def inferImplicit(pt: Type, argument: ast.tpd.Tree, pos: Position)(implicit ctx: Context): SearchResult

    Find an implicit parameter or conversion.

    Find an implicit parameter or conversion.

    pt

    The expected type of the parameter or conversion.

    argument

    If an implicit conversion is searched, the argument to which it should be applied, EmptyTree otherwise.

    pos

    The position where errors should be reported. !!! todo: catch potential cycles

    Definition Classes
    Implicits
  95. def inferImplicitArg(formal: Type, error: ((String) ⇒ String) ⇒ Unit, pos: Position)(implicit ctx: Context): ast.tpd.Tree

    Find an implicit argument for parameter formal.

    Find an implicit argument for parameter formal.

    error

    An error handler that gets an error message parameter which is itself parameterized by another string, indicating where the implicit parameter is needed

    Definition Classes
    Implicits
  96. def inferView(from: ast.tpd.Tree, to: Type)(implicit ctx: Context): SearchResult

    Find an implicit conversion to apply to given tree from so that the result is compatible with type to.

    Find an implicit conversion to apply to given tree from so that the result is compatible with type to.

    Definition Classes
    Implicits
  97. def invalidateCompanions(pkg: Symbol, xstats: List[ast.untpd.Tree])(implicit ctx: Context): Unit

    For all class definitions stat in xstats: If the companion class if not also defined in xstats, invalidate it by setting its info to NoType.

    For all class definitions stat in xstats: If the companion class if not also defined in xstats, invalidate it by setting its info to NoType.

    Definition Classes
    Namer
  98. def isApplicable(tp: Type, args: List[Type], resultType: Type)(implicit ctx: Context): Boolean

    Is given type applicable to argument types args, possibly after inserting an apply?

    Is given type applicable to argument types args, possibly after inserting an apply?

    resultType

    The expected result type of the application

    Definition Classes
    Applications
  99. def isApplicable(tp: Type, targs: List[Type], args: List[ast.tpd.Tree], resultType: Type)(implicit ctx: Context): Boolean

    Is given type applicable to type arguments targs and argument trees args, possibly after inserting an apply?

    Is given type applicable to type arguments targs and argument trees args, possibly after inserting an apply?

    resultType

    The expected result type of the application

    Definition Classes
    Applications
  100. def isApplicable(methRef: TermRef, args: List[Type], resultType: Type)(implicit ctx: Context): Boolean

    Is given method reference applicable to argument types args?

    Is given method reference applicable to argument types args?

    resultType

    The expected result type of the application

    Definition Classes
    Applications
  101. def isApplicable(methRef: TermRef, targs: List[Type], args: List[ast.tpd.Tree], resultType: Type)(implicit ctx: Context): Boolean

    Is given method reference applicable to type arguments targs and argument trees args?

    Is given method reference applicable to type arguments targs and argument trees args?

    resultType

    The expected result type of the application

    Definition Classes
    Applications
  102. def isAsGood(alt1: TermRef, alt2: TermRef)(implicit ctx: Context): Boolean

    In a set of overloaded applicable alternatives, is alt1 at least as good as alt2? alt1 and alt2 are non-overloaded references.

    In a set of overloaded applicable alternatives, is alt1 at least as good as alt2? alt1 and alt2 are non-overloaded references.

    Definition Classes
    Applications
  103. def isCompatible(tp: Type, pt: Type)(implicit ctx: Context): Boolean

    A type tp is compatible with a type pt if one of the following holds:

    A type tp is compatible with a type pt if one of the following holds:

    1. tp is a subtype of pt 2. pt is by name parameter type, and tp is compatible with its underlying type 3. there is an implicit conversion from tp to pt. 4. tp is a numeric subtype of pt (this case applies even if implicit conversions are disabled)
    Definition Classes
    Compatibility
  104. def isDirectlyApplicable(methRef: TermRef, targs: List[Type], args: List[ast.tpd.Tree], resultType: Type)(implicit ctx: Context): Boolean

    Is given method reference applicable to type arguments targs and argument trees args without inferring views?

    Is given method reference applicable to type arguments targs and argument trees args without inferring views?

    resultType

    The expected result type of the application

    Definition Classes
    Applications
  105. def isEnumConstant(vd: ast.untpd.ValDef)(implicit ctx: Context): Boolean

    Determines whether this field holds an enum constant.

    Determines whether this field holds an enum constant. To qualify, the following conditions must be met:

    • The field's class has the ENUM flag set
    • The field's class extends java.lang.Enum
    • The field has the ENUM flag set
    • The field is static
    • The field is stable
    Definition Classes
    Namer
  106. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  107. def localContext(tree: ast.untpd.Tree, owner: Symbol)(implicit ctx: Context): FreshContext

    A fresh local context with given tree and owner.

    A fresh local context with given tree and owner. Owner might not exist (can happen for self valdefs), in which case no owner is set in result context

    Attributes
    protected
  108. def localDummy(cls: ClassSymbol, impl: ast.untpd.Template)(implicit ctx: Context): Symbol

  109. def localTyper(sym: Symbol): Typer

    Attributes
    protected
  110. def moduleValSig(sym: Symbol)(implicit ctx: Context): Type

    The signature of a module valdef.

    The signature of a module valdef. This will compute the corresponding module class TypeRef immediately without going through the defined type of the ValDef. This is necessary to avoid cyclic references involving imports and module val defs.

    Definition Classes
    Namer
  111. def narrowMostSpecific(alts: List[TermRef])(implicit ctx: Context): List[TermRef]

    Definition Classes
    Applications
  112. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  113. lazy val nestedTyper: AnyRefMap[Symbol, Typer]

    A map from method symbols to nested typers.

    A map from method symbols to nested typers. Populated when methods are completed. Emptied when they are typechecked. The nested typer contains new versions of the four maps above including this one, so that trees that are shared between different DefDefs can be independently used as indices. It also contains a scope that contains nested parameters.

    Definition Classes
    Namer
  114. def newLikeThis: Typer

  115. def normalizedCompatible(tp: Type, pt: Type)(implicit ctx: Context): Boolean

    Test compatibility after normalization in a fresh typerstate.

    Test compatibility after normalization in a fresh typerstate.

    Definition Classes
    Compatibility
  116. final def notify(): Unit

    Definition Classes
    AnyRef
  117. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  118. def qualifyingClass(tree: ast.untpd.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).

    Definition Classes
    TypeAssigner
  119. final def reallyExists(denot: Denotation)(implicit ctx: 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.

    Definition Classes
    TypeAssigner
  120. def recordSym(sym: Symbol, tree: ast.untpd.Tree)(implicit ctx: Context): Symbol

    Record sym as the symbol defined by tree

    Record sym as the symbol defined by tree

    Definition Classes
    Namer
  121. def resolveOverloaded(alts: List[TermRef], pt: Type)(implicit ctx: Context): List[TermRef]

    Resolve overloaded alternative alts, given expected type pt and possibly also type argument targs that need to be applied to each alternative to form the method type.

    Resolve overloaded alternative alts, given expected type pt and possibly also type argument targs that need to be applied to each alternative to form the method type. todo: use techniques like for implicits to pick candidates quickly?

    Definition Classes
    Applications
  122. def retrieveSym(tree: ast.untpd.Tree)(implicit ctx: Context): Symbol

    Retrieve symbol attached to given tree

    Retrieve symbol attached to given tree

    Attributes
    protected
  123. val scope: MutableScope

    The scope of the typer.

    The scope of the typer. For nested typers this is a place parameters are entered during completion and where they survive until typechecking. A context with this typer also has this scope.

    Definition Classes
    Namer
  124. 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.

    Definition Classes
    TypeAssigner
  125. def seqToRepeated(tree: ast.tpd.Tree)(implicit ctx: Context): ast.tpd.Tree

    Definition Classes
    TypeAssigner
  126. def setDocstring(sym: Symbol, tree: ast.untpd.Tree)(implicit ctx: Context): Unit

    Definition Classes
    Namer
  127. def symbolOfTree(tree: ast.untpd.Tree)(implicit ctx: Context): Symbol

    The symbol of the given expanded tree.

    The symbol of the given expanded tree.

    Definition Classes
    Namer
  128. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  129. def synthesizedClassTag(formal: Type, pos: Position)(implicit ctx: Context): ast.tpd.Tree

    If formal is of the form ClassTag[T], where T is a class type, synthesize a class tag for T.

    If formal is of the form ClassTag[T], where T is a class type, synthesize a class tag for T.

    Definition Classes
    Implicits
  130. def toString(): String

    Definition Classes
    AnyRef → Any
  131. def tryEither[T](op: (Context) ⇒ T)(fallBack: (T, TyperState) ⇒ T)(implicit ctx: Context): T

  132. def tryInsertApplyOrImplicit(tree: ast.tpd.Tree, pt: ProtoType)(fallBack: (ast.tpd.Tree, TyperState) ⇒ ast.tpd.Tree)(implicit ctx: Context): ast.tpd.Tree

    Add apply node or implicit conversions.

    Add apply node or implicit conversions. Two strategies are tried, and the first that is successful is picked. If neither of the strategies are successful, continues with fallBack.

    1st strategy: Try to insert .apply so that the result conforms to prototype pt. 2nd strategy: If tree is a select qual.name, try to insert an implicit conversion around the qualifier part qual so that the result conforms to the expected type with wildcard result type.

  133. def tryInsertImplicitOnQualifier(tree: ast.tpd.Tree, pt: Type)(implicit ctx: Context): Option[ast.tpd.Tree]

    If this tree is a select node qual.name, try to insert an implicit conversion c around qual so that c(qual).name conforms to pt.

  134. def typeDefSig(tdef: ast.untpd.TypeDef, sym: Symbol, tparamSyms: List[TypeSymbol])(implicit ctx: Context): Type

    Definition Classes
    Namer
  135. def typed(tree: ast.untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

  136. def typedAheadAnnotation(tree: ast.untpd.Tree)(implicit ctx: Context): Symbol

    Definition Classes
    Namer
  137. def typedAheadExpr(tree: ast.untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

    Definition Classes
    Namer
  138. def typedAheadType(tree: ast.untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

    Definition Classes
    Namer
  139. def typedAlternative(tree: ast.untpd.Alternative, pt: Type)(implicit ctx: Context): ast.tpd.Alternative

  140. def typedAndTypeTree(tree: ast.untpd.AndTypeTree)(implicit ctx: Context): ast.tpd.AndTypeTree

  141. def typedAnnotated(tree: ast.untpd.Annotated, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  142. def typedAnnotation(annot: ast.untpd.Tree)(implicit ctx: Context): ast.tpd.Tree

  143. def typedAppliedTypeTree(tree: ast.untpd.AppliedTypeTree)(implicit ctx: Context): ast.tpd.Tree

  144. def typedApply(tree: ast.untpd.Apply, pt: Type)(implicit ctx: Context): ast.tpd.Tree

    Definition Classes
    Applications
  145. def typedAsFunction(tree: PostfixOp, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  146. def typedAssign(tree: ast.untpd.Assign, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  147. def typedBind(tree: ast.untpd.Bind, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  148. def typedBlock(tree: ast.untpd.Block, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  149. def typedByNameTypeTree(tree: ast.untpd.ByNameTypeTree)(implicit ctx: Context): ast.tpd.ByNameTypeTree

  150. def typedCase(tree: ast.untpd.CaseDef, pt: Type, selType: Type, gadtSyms: Set[Symbol])(implicit ctx: Context): ast.tpd.CaseDef

    Type a case.

    Type a case. Overridden in ReTyper, that's why it's separate from typedCases.

  151. def typedCases(cases: List[ast.untpd.CaseDef], selType: Type, pt: Type)(implicit ctx: Context): List[ast.tpd.CaseDef]

  152. def typedClassDef(cdef: ast.untpd.TypeDef, cls: ClassSymbol)(implicit ctx: Context): TypeDef[Type]

  153. def typedClosure(tree: ast.untpd.Closure, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  154. def typedDefDef(ddef: ast.untpd.DefDef, sym: Symbol)(implicit ctx: Context): DefDef[Type]

  155. def typedDynamicApply(tree: ast.untpd.Apply, pt: Type)(implicit ctx: Context): ast.tpd.Tree

    Translate selection that does not typecheck according to the normal rules into a applyDynamic/applyDynamicNamed.

    Translate selection that does not typecheck according to the normal rules into a applyDynamic/applyDynamicNamed. foo.bar(baz0, baz1, ...) ~~> foo.applyDynamic(bar)(baz0, baz1, ...) foo.bar[T0, ...](baz0, baz1, ...) ~~> foo.applyDynamic[T0, ...](bar)(baz0, baz1, ...) foo.bar(x = bazX, y = bazY, baz, ...) ~~> foo.applyDynamicNamed("bar")(("x", bazX), ("y", bazY), ("", baz), ...) foo.bar[T0, ...](x = bazX, y = bazY, baz, ...) ~~> foo.applyDynamicNamed[T0, ...]("bar")(("x", bazX), ("y", bazY), ("", baz), ...)

    Definition Classes
    Dynamic
  156. def typedDynamicAssign(tree: ast.untpd.Assign, pt: Type)(implicit ctx: Context): ast.tpd.Tree

    Translate selection that does not typecheck according to the normal rules into a updateDynamic.

    Translate selection that does not typecheck according to the normal rules into a updateDynamic. foo.bar = baz ~~> foo.updateDynamic(bar)(baz)

    Definition Classes
    Dynamic
  157. def typedDynamicSelect(tree: ast.untpd.Select, targs: List[ast.tpd.Tree], pt: Type)(implicit ctx: Context): ast.tpd.Tree

    Translate selection that does not typecheck according to the normal rules into a selectDynamic.

    Translate selection that does not typecheck according to the normal rules into a selectDynamic. foo.bar ~~> foo.selectDynamic(bar) foo.bar[T0, ...] ~~> foo.selectDynamic[T0, ...](bar)

    Note: inner part of translation foo.bar(baz) = quux ~~> foo.selectDynamic(bar).update(baz, quux) is achieved through an existing transformation of in typedAssign [foo.bar(baz) = quux ~~> foo.bar.update(baz, quux)].

    Definition Classes
    Dynamic
  158. def typedExpr(tree: ast.untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

  159. def typedFunction(tree: Function, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  160. def typedIdent(tree: ast.untpd.Ident, pt: Type)(implicit ctx: Context): ast.tpd.Tree

    Attribute an identifier consisting of a simple name or wildcard

    Attribute an identifier consisting of a simple name or wildcard

    tree

    The tree representing the identifier. Transformations: (1) Prefix class members with this. (2) Change imported symbols to selections. (3) Change pattern Idents id (but not wildcards) to id @ _

  161. def typedIf(tree: ast.untpd.If, pt: Type)(implicit ctx: Context): If[Type]

  162. def typedImport(imp: ast.untpd.Import, sym: Symbol)(implicit ctx: Context): ast.tpd.Import

  163. def typedLiteral(tree: ast.untpd.Literal)(implicit ctx: Context): ThisTree[Type]

  164. def typedMatch(tree: ast.untpd.Match, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  165. def typedNamedArg(tree: ast.untpd.NamedArg, pt: Type)(implicit ctx: Context): NamedArg[Type]

  166. def typedNamedArgs(args: List[ast.untpd.Tree])(implicit ctx: Context): List[NamedArg[Type]]

    Definition Classes
    Applications
  167. def typedNew(tree: ast.untpd.New, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  168. def typedOrTypeTree(tree: ast.untpd.OrTypeTree)(implicit ctx: Context): ast.tpd.OrTypeTree

  169. def typedPackageDef(tree: ast.untpd.PackageDef)(implicit ctx: Context): ast.tpd.Tree

  170. def typedPair(tree: ast.untpd.Pair, pt: Type)(implicit ctx: Context): ast.Trees.Pair[Type]

  171. def typedPattern(tree: ast.untpd.Tree, selType: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

  172. def typedRefinedTypeTree(tree: ast.untpd.RefinedTypeTree)(implicit ctx: Context): ast.tpd.RefinedTypeTree

  173. def typedReturn(tree: ast.untpd.Return)(implicit ctx: Context): ast.tpd.Return

  174. def typedSelect(tree: ast.untpd.Select, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  175. def typedSelectFromTypeTree(tree: ast.untpd.SelectFromTypeTree, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  176. def typedSeqLiteral(tree: ast.untpd.SeqLiteral, pt: Type)(implicit ctx: Context): ast.tpd.SeqLiteral

  177. def typedSingletonTypeTree(tree: ast.untpd.SingletonTypeTree)(implicit ctx: Context): ast.tpd.SingletonTypeTree

  178. def typedStats(stats: List[ast.untpd.Tree], exprOwner: Symbol)(implicit ctx: Context): List[ast.tpd.Tree]

  179. def typedSuper(tree: ast.untpd.Super, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  180. def typedThis(tree: ast.untpd.This)(implicit ctx: Context): ast.tpd.Tree

  181. def typedThrow(tree: Throw)(implicit ctx: Context): ast.tpd.Tree

  182. def typedTrees(trees: List[ast.untpd.Tree])(implicit ctx: Context): List[ast.tpd.Tree]

  183. def typedTry(tree: ast.untpd.Try, pt: Type)(implicit ctx: Context): ast.tpd.Try

  184. def typedType(tree: ast.untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

  185. def typedTypeApply(tree: ast.untpd.TypeApply, pt: Type)(implicit ctx: Context): ast.tpd.Tree

    Definition Classes
    Applications
  186. def typedTypeBoundsTree(tree: ast.untpd.TypeBoundsTree)(implicit ctx: Context): ast.tpd.TypeBoundsTree

  187. def typedTypeDef(tdef: ast.untpd.TypeDef, sym: Symbol)(implicit ctx: Context): ast.tpd.Tree

  188. def typedTypeLambdaTree(tree: ast.untpd.TypeLambdaTree)(implicit ctx: Context): ast.tpd.Tree

  189. def typedTypeTree(tree: ast.untpd.TypeTree, pt: Type)(implicit ctx: Context): ast.tpd.TypeTree

  190. def typedTyped(tree: ast.untpd.Typed, pt: Type)(implicit ctx: Context): ast.tpd.Tree

  191. def typedUnApply(tree: ast.untpd.UnApply, selType: Type)(implicit ctx: Context): Nothing

    A typed unapply hook, can be overridden by re any-typers between frontend and pattern matcher.

    A typed unapply hook, can be overridden by re any-typers between frontend and pattern matcher.

    Definition Classes
    Applications
  192. def typedUnApply(tree: ast.untpd.Apply, selType: Type)(implicit ctx: Context): ast.tpd.Tree

    Definition Classes
    Applications
  193. def typedUnadapted(initTree: ast.untpd.Tree, pt: Type = WildcardType)(implicit ctx: Context): ast.tpd.Tree

  194. def typedValDef(vdef: ast.untpd.ValDef, sym: Symbol)(implicit ctx: Context): ValDef[Type]

  195. def valOrDefDefSig(mdef: ast.untpd.ValOrDefDef, sym: Symbol, typeParams: List[Symbol], paramss: List[List[Symbol]], paramFn: (Type) ⇒ Type)(implicit ctx: Context): Type

    The type signature of a ValDef or DefDef

    The type signature of a ValDef or DefDef

    mdef

    The definition

    sym

    Its symbol

    paramFn

    A wrapping function that produces the type of the defined symbol, given its final return type

    Definition Classes
    Namer
  196. def viewExists(from: Type, to: Type)(implicit ctx: Context): Boolean

    Definition Classes
    Implicits
  197. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  198. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  199. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Checking

Inherited from Dynamic

Inherited from Implicits

Inherited from Applications

Inherited from Compatibility

Inherited from TypeAssigner

Inherited from Namer

Inherited from AnyRef

Inherited from Any

Ungrouped