Packages

abstract class Typer extends Analyzer.TyperDiagnostics with Analyzer.Adaptation with Analyzer.Tag with Analyzer.PatternTyper with Analyzer.TyperContextErrors

Source
Typers.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Typer
  2. TyperContextErrors
  3. PatternTyper
  4. Tag
  5. Adaptation
  6. TyperDiagnostics
  7. AnyRef
  8. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Typer(context0: Analyzer.Context)

Type Members

  1. abstract class QualifierTraverser extends Global.Traverser

Value Members

  1. object TyperErrorGen
    Definition Classes
    TyperContextErrors
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int
    Definition Classes
    AnyRef → Any
  4. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toany2stringadd[Analyzer.Typer] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  5. def ->[B](y: B): (Analyzer.Typer, B)
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toArrowAssoc[Analyzer.Typer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def adapt(tree: Global.Tree, mode: Mode, pt: Global.Type, original: Global.Tree = EmptyTree): Global.Tree

    Perform the following adaptations of expression, pattern or type tree wrt to given mode mode and given prototype pt: (-1) For expressions with annotated types, let AnnotationCheckers decide what to do (0) Convert expressions with constant types to literals (unless in interactive/scaladoc mode) (1) Resolve overloading, unless mode contains FUNmode (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 mode mode and given prototype pt: (-1) For expressions with annotated types, let AnnotationCheckers decide what to do (0) Convert expressions with constant types to literals (unless in interactive/scaladoc mode) (1) Resolve overloading, unless mode contains FUNmode (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 (see adaptToImplicitMethod) (4.2) otherwise, if the method is 0-ary and it can be auto-applied (see checkCanAutoApply), apply it to () (4.3) otherwise, if the method is not a constructor, and can be eta-expanded (see checkCanEtaExpand), eta-expand 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, do SAM conversion (15) When in mode EXPRmode, apply a view If all this fails, error

    Note: the original tree parameter is for re-typing implicit method invocations (see below) and should not be used otherwise. TODO: can it be replaced with a tree attachment?

    Attributes
    protected
  8. def adaptAfterOverloadResolution(tree: Global.Tree, mode: Mode, pt: Global.Type = WildcardType, original: Global.Tree = EmptyTree): Global.Tree
  9. def adaptCase(cdef: Global.CaseDef, mode: Mode, tpe: Global.Type): Global.CaseDef
  10. def adaptToArguments(qual: Global.Tree, name: Global.Name, args: List[Global.Tree], pt: Global.Type, reportAmbiguous: Boolean = true, saveErrors: Boolean = true): Global.Tree

    Try to apply an implicit conversion to qual to that it contains a method name which can be applied to arguments args with expected type pt.

    Try to apply an implicit conversion to qual to that it contains a method name which can be applied to arguments args with expected type pt. If pt is defined, there is a fallback to try again with pt = ?. This helps avoiding propagating result information too far and solves #1756. If no conversion is found, return qual unchanged.

  11. def adaptToMember(qual: Global.Tree, searchTemplate: Global.Type, reportAmbiguous: Boolean = true, saveErrors: Boolean = true): Global.Tree
  12. def adaptToMemberWithArgs(tree: Global.Tree, qual: Global.Tree, name: Global.Name, mode: Mode, reportAmbiguous: Boolean = true, saveErrors: Boolean = true): Global.Tree

    Try to apply an implicit conversion to qual so that it contains a method name.

    Try to apply an implicit conversion to qual so that it contains a method name. If that's ambiguous try taking arguments into account using adaptToArguments.

  13. def adaptToName(qual: Global.Tree, name: Global.Name): Global.Tree

    Try to apply an implicit conversion to qual to that it contains a member name of arbitrary type.

    Try to apply an implicit conversion to qual to that it contains a member name of arbitrary type. If no conversion is found, return qual unchanged.

  14. def analyzeSuperConsructor(meth: Global.Symbol, vparamss: List[List[Global.ValDef]], rhs: Global.Tree): Unit

    Analyze the super constructor call to record information used later to compute parameter aliases

  15. def applyImplicitArgs(fun: Global.Tree): Global.Tree

    Find implicit arguments and pass them to given tree.

  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def atOwner(tree: Global.Tree, owner: Global.Symbol): Analyzer.Typer
  18. def atOwner(owner: Global.Symbol): Analyzer.Typer
  19. def callToCompanionConstr(context: Analyzer.Context, calledFun: Global.Symbol): Boolean
  20. def canAdaptConstantTypeToLiteral: Boolean

    Overridden to false in scaladoc and/or interactive.

  21. def canTranslateEmptyListToNil: Boolean
  22. def checkClassType(tpt: Global.Tree): Boolean

    Check that tpt refers to a non-refinement class type

  23. def checkExistentialsFeature(pos: Global.Position, tpe: Global.Type, prefix: String): AnyVal
  24. def checkFeature(pos: Global.Position, featureTrait: Global.Symbol, construct: => String = "", immediate: Boolean = false): Boolean

    Check whether feature given by featureTrait is enabled.

    Check whether feature given by featureTrait is enabled. If it is not, issue an error or a warning depending on whether the feature is required.

    construct

    A string expression that is substituted for "#" in the feature description string

    immediate

    When set, feature check is run immediately, otherwise it is run at the end of the typechecking run for the enclosing unit. This is done to avoid potential cyclic reference errors by implicits that are forced too early.

    returns

    if feature check is run immediately: true if feature is enabled, false otherwise if feature check is delayed or suppressed because we are past typer: true

  25. def checkFinitary(classinfo: Global.ClassInfoType): Unit
  26. def checkMethodStructuralCompatible(ddef: Global.DefDef): Unit

    Check if a structurally defined method violates implementation restrictions.

    Check if a structurally defined method violates implementation restrictions. A method cannot be called if it is a non-private member of a refinement type and if its parameter's types are any of:

    • the self-type of the refinement
    • a type member of the refinement
    • an abstract type declared outside of the refinement.
    • an instance of a value class Furthermore, the result type may not be a value class either
  27. def checkNonCyclic(defn: Global.Tree, tpt: Global.Tree): Unit
  28. def checkNonCyclic(sym: Global.Symbol): Unit
  29. def checkNonCyclic(pos: Global.Position, tp: Global.Type, lockedSym: Global.Symbol): Boolean
  30. def checkNonCyclic(pos: Global.Position, tp: Global.Type): Boolean

    Check that type tp is not a subtype of itself.

  31. def checkRootOfQualifier(q: Global.Tree, mode: Mode): Global.Tree

    If import from path starting with _root_, warn if there is a _root_ value in scope, and ensure _root_ can only be the root package in that position.

    If import from path starting with _root_, warn if there is a _root_ value in scope, and ensure _root_ can only be the root package in that position.

    Annotations
    @inline()
  32. def checkStablePrefixClassType(tpt: Global.Tree): Boolean

    Check that tpt refers to a class type with a stable prefix.

  33. def checkValidAdaptation(t: Global.Tree, args: List[Global.Tree]): Boolean
    Definition Classes
    Adaptation
  34. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  35. def computeMacroDefType(ddef: Global.DefDef, pt: Global.Type): Global.Type
  36. def computeType(tree: Global.Tree, pt: Global.Type): Global.Type
  37. final def constrTyperIf(inConstr: Boolean): Analyzer.Typer

    The typer for an expression, depending on where we are.

    The typer for an expression, depending on where we are. If we are before a superclass call, this is a typer over a constructor context; otherwise it is the current typer.

  38. var context: Analyzer.Context
  39. def context1: Analyzer.Context
  40. def cyclicReferenceMessage(sym: Global.Symbol, tree: Global.Tree): Option[String]

    Returns Some(msg) if the given tree is untyped apparently due to a cyclic reference, and None otherwise.

    Returns Some(msg) if the given tree is untyped apparently due to a cyclic reference, and None otherwise.

    Definition Classes
    TyperDiagnostics
  41. def doTypedApply(tree: Global.Tree, fun0: Global.Tree, args: List[Global.Tree], mode: Mode, pt: Global.Type): Global.Tree
  42. def doTypedUnapply(tree: Global.Tree, funOrig: Global.Tree, funOverloadResolved: Global.Tree, args: List[Global.Tree], mode: Mode, pt: Global.Type): Global.Tree
    Definition Classes
    PatternTyper
  43. def dropExistential(tp: Global.Type): Global.Type
  44. def ensuring(cond: (Analyzer.Typer) => Boolean, msg: => Any): Analyzer.Typer
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toEnsuring[Analyzer.Typer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  45. def ensuring(cond: (Analyzer.Typer) => Boolean): Analyzer.Typer
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toEnsuring[Analyzer.Typer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  46. def ensuring(cond: Boolean, msg: => Any): Analyzer.Typer
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toEnsuring[Analyzer.Typer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  47. def ensuring(cond: Boolean): Analyzer.Typer
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toEnsuring[Analyzer.Typer] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  48. def enterSym(txt: Analyzer.Context, tree: Global.Tree): Analyzer.Context
    Attributes
    protected
  49. def enterSyms(txt: Analyzer.Context, trees: List[Global.Tree]): Unit
    Attributes
    protected
  50. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  52. def extractorForUncheckedType(pos: Global.Position, pt: Global.Type): Global.Tree
    Definition Classes
    PatternTyper
  53. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  54. def finishMethodSynthesis(templ: Global.Template, clazz: Global.Symbol, context: Analyzer.Context): Global.Template

    In order to override this in the TreeCheckers Typer so synthetics aren't re-added all the time, it is exposed here the module/class typing methods go through it.

    In order to override this in the TreeCheckers Typer so synthetics aren't re-added all the time, it is exposed here the module/class typing methods go through it. ...but it turns out it's also the ideal spot for namer/typer coordination for the tricky method synthesis scenarios, so we'll make it that.

    Attributes
    protected
  55. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toStringFormat[Analyzer.Typer] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  56. implicit def fresh: FreshNameCreator
  57. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  58. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  59. val infer: Analyzer.Inferencer
  60. def inferSamType(fun: Global.Tree, pt: Global.Type, mode: Mode): Boolean

    Synthesize and type check the implementation of a type with a Single Abstract Method.

    Synthesize and type check the implementation of a type with a Single Abstract Method.

    Based on a type checked Function node { (p1: T1, ..., pN: TN) => body } : S where S is the expected type that defines a single abstract method (call it apply for the example), that has signature (p1: T1', ..., pN: TN'): T', synthesize the instantiation of the following anonymous class

    new S { def apply$body(p1: T1, ..., pN: TN): T = body def apply(p1: T1', ..., pN: TN'): T' = apply$body(p1,..., pN) }

    The apply method is identified by the argument sam; S corresponds to the argument pt, If pt is not fully defined, we derive samClassTpFullyDefined by inferring any unknown type parameters.

    The types T1' ... TN' and T' are derived from the method signature of the sam method, as seen from the fully defined samClassTpFullyDefined.

    The function's body is put in a (static) method in the class definition to enforce scoping. S's members should not be in scope in body. (Putting it in the block outside the class runs into implementation problems described below)

    The restriction on implicit arguments (neither S's constructor, nor sam may take an implicit argument list), is to keep the implementation of type inference (the computation of samClassTpFullyDefined) simple.

    Impl notes:

    • fun has a FunctionType, but the expected type pt is some SAM type -- let's remedy that
    • fun is fully attributed, so we'll have to wrangle some symbols into shape (owner change, vparam syms)
    • after experimentation, it works best to type check function literals fully first and then adapt to a sam type, as opposed to a sam-specific code paths earlier on in type checking (in typedFunction). For one, we want to emit the same bytecode regardless of whether the expected function type is a built-in FunctionN or some SAM type
  61. def inferView(tree: Global.Tree, from: Global.Type, to: Global.Type, reportAmbiguous: Boolean = true, saveErrors: Boolean = true): Global.Tree

    Infer an implicit conversion (view) between two types.

    Infer an implicit conversion (view) between two types.

    tree

    The tree which needs to be converted.

    from

    The source type of the conversion

    to

    The target type of the conversion

    reportAmbiguous

    Should ambiguous implicit errors be reported? False iff we search for a view to find out whether one type is coercible to another.

    saveErrors

    Should ambiguous and divergent implicit errors that were buffered during the inference of a view be put into the original buffer. False iff we don't care about them.

  62. def instantiate(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
  63. def instantiateExpectingUnit(tree: Global.Tree, mode: Mode): Global.Tree

    If the expected type is Unit: try instantiating type arguments with expected type Unit, but if that fails, try again with pt = WildcardType and discard the expression.

  64. def instantiatePossiblyExpectingUnit(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
  65. def isCapturedExistential(sym: Global.Symbol): Boolean
  66. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  67. def isReferencedFrom(ctx: Analyzer.Context, sym: Global.Symbol): Boolean
  68. def isStale(sym: Global.Symbol): Boolean

    A symbol is stale if it is toplevel, to be loaded from a classfile, and the classfile is produced from a sourcefile which is compiled in the current run.

  69. def labelTyper(ldef: Global.LabelDef): Analyzer.Typer

    The typer for a label definition.

    The typer for a label definition. If this is part of a template we first have to enter the label definition.

  70. final def lookupTransformed(tree: Global.Tree): Option[Global.Tree]
  71. def macroImplementationNotFoundMessage(name: Global.Name): String

    This file will be the death of me.

    This file will be the death of me.

    Attributes
    protected
    Definition Classes
    TyperContextErrors
  72. def member(qual: Global.Type, name: Global.Name): Global.Symbol

    The member with given name of given qualifier type

  73. def missingSelectErrorTree(tree: Global.Tree, qual: Global.Tree, name: Global.Name): Global.Tree
  74. def namer: Analyzer.Namer
  75. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  76. def needsInstantiation(tparams: List[Global.Symbol], formals: List[Global.Type], args: List[Global.Tree]): Boolean

    Does function need to be instantiated, because a missing parameter in an argument closure overlaps with an uninstantiated formal?

  77. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  78. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  79. def packCaptured(tpe: Global.Type): Global.Type
  80. def packSymbols(hidden: List[Global.Symbol], tp: Global.Type): Global.Type

    Compute an existential type from raw hidden symbols syms and type tp

  81. def packedType(tree: Global.Tree, owner: Global.Symbol): Global.Type

    convert local symbols and skolems to existentials

  82. def packedTypes(trees: List[Global.Tree]): List[Global.Type]
  83. def permanentlyHiddenWarning(pos: Global.Position, hidden: Global.Name, defn: Global.Symbol): Unit
    Definition Classes
    TyperDiagnostics
  84. def phasedAppliedType(sym: Global.Symbol, args: List[Global.Type]): Global.Type
  85. def qualifyingClass(tree: Global.Tree, qual: Global.Name, packageOK: Boolean, immediate: Boolean): Global.Symbol

    The qualifying class of a this or super with prefix qual.

    The qualifying class of a this or super with prefix qual. packageOk is equal false when qualifying class symbol

  86. def reallyExists(sym: Global.Symbol): Boolean

    Is symbol defined and not stale?

  87. def reenterTypeParams(tparams: List[Global.TypeDef]): List[Global.Symbol]
  88. def reenterValueParams(vparamss: List[List[Global.ValDef]]): Unit
  89. def reportTypeError(context0: Analyzer.Context, pos: Global.Position, ex: Global.TypeError): Unit

    Report a type error.

    Report a type error.

    pos

    The position where to report the error

    ex

    The exception that caused the error

    Definition Classes
    TyperDiagnostics
  90. def resolveClassTag(pos: Global.Position, tp: Global.Type, allowMaterialization: Boolean = true): Global.Tree

    Finds in scope or materializes a ClassTag.

    Finds in scope or materializes a ClassTag. Should be used instead of ClassManifest every time compiler needs to persist an erasure.

    Once upon a time, we had an ErasureTag which was to ClassTag the same that WeakTypeTag is for TypeTag. However we found out that we don't really need this concept, so it got removed.

    pos

    Position for error reporting. Please, provide meaningful value.

    tp

    Type we're looking a ClassTag for, e.g. resolveClassTag(pos, IntTpe) will look for ClassTag[Int].

    allowMaterialization

    If true (default) then the resolver is allowed to launch materialization macros when there's no class tag in scope. If false then materialization macros are prohibited from running.

    returns

    Tree that represents an scala.reflect.ClassTag for tp if everything is okay. EmptyTree if the result contains unresolved (i.e. not spliced) type parameters and abstract type members. EmptyTree if allowMaterialization is false, and there is no class tag in scope.

    Definition Classes
    Tag
  91. def resolveTypeTag(pos: Global.Position, pre: Global.Type, tp: Global.Type, concrete: Boolean, allowMaterialization: Boolean = true): Global.Tree

    Finds in scope or materializes an WeakTypeTag (if concrete is false) or a TypeTag (if concrete is true).

    Finds in scope or materializes an WeakTypeTag (if concrete is false) or a TypeTag (if concrete is true).

    pos

    Position for error reporting. Please, provide meaningful value.

    pre

    Prefix that represents a universe this type tag will be bound to. If pre is set to NoType, then any type tag in scope will do, regardless of its affiliation. If pre is set to NoType, and tag resolution involves materialization, then mkRuntimeUniverseRef will be used.

    tp

    Type we're looking a TypeTag for, e.g. resolveTypeTag(pos, mkRuntimeUniverseRef, IntTpe, false) will look for scala.reflect.runtime.universe.TypeTag[Int].

    concrete

    If true then the result must not contain unresolved (i.e. not spliced) type parameters and abstract type members. If false then the function will always succeed (abstract types will be reified as free types).

    allowMaterialization

    If true (default) then the resolver is allowed to launch materialization macros when there's no type tag in scope. If false then materialization macros are prohibited from running.

    returns

    Tree that represents a scala.reflect.TypeTag for tp if everything is okay. EmptyTree if concrete is true and the result contains unresolved (i.e. not spliced) type parameters and abstract type members. EmptyTree if allowMaterialization is false, and there is no array tag in scope.

    Definition Classes
    Tag
  92. def rewrappingWrapperTrees(f: (Global.Tree) => List[Global.Tree]): (Global.Tree) => List[Global.Tree]

    For flatMapping a list of trees when you want the DocDefs and Annotated to be transparent.

  93. def silent[T](op: (Analyzer.Typer) => T, reportAmbiguousErrors: Boolean = context.ambiguousErrors, newtree: Global.Tree = context.tree): Analyzer.SilentResult[T]
  94. def stabilize(tree: Global.Tree, pre: Global.Type, mode: Mode, pt: Global.Type): Global.Tree

    Post-process an identifier or selection node, performing the following:

    Post-process an identifier or selection node, performing the following:

    1. Check that non-function pattern expressions are stable (ignoring volatility concerns -- scala/bug#6815) (and narrow the type of modules: a module reference in a pattern has type Foo.type, not "object Foo") 2. Check that packages and static modules are not used as values 3. Turn tree type into stable type if possible and required by context. 4. Give getClass calls a more precise type based on the type of the target of the call.
    Attributes
    protected
  95. def stabilizeFun(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
  96. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  97. def synthesizePartialFunction(paramName: Global.TermName, paramPos: Global.Position, paramSynthetic: Boolean, tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    synthesize and type check a PartialFunction implementation based on the match in tree

    synthesize and type check a PartialFunction implementation based on the match in tree

    param => sel match { cases } becomes:

    new AbstractPartialFunction[$argTp, $matchResTp] { def applyOrElse[A1 <: $argTp, B1 >: $matchResTp]($param: A1, default: A1 => B1): B1 = $selector match { $cases } def isDefinedAt(x: $argTp): Boolean = $selector match { $casesTrue } }

    TODO: it would be nicer to generate the tree specified above at once and type it as a whole, there are two gotchas:

    • matchResTp may not be known until we've typed the match (can only use resTp when it's fully defined),
      • if we typed the match in isolation first, you'd know its result type, but would have to re-jig the owner structure
      • could we use a type variable for matchResTp and backpatch it?
    • occurrences of this in cases or sel must resolve to the this of the class originally enclosing the match, not of the anonymous partial function subclass

    an alternative TODO: add partial function AST node or equivalent and get rid of this synthesis --> do everything in uncurry (or later) however, note that pattern matching codegen is designed to run *before* uncurry

  98. def toString(): String
    Definition Classes
    AnyRef → Any
  99. final def transformedOr(tree: Global.Tree, op: => Global.Tree): Global.Tree
    Annotations
    @inline()
  100. final def transformedOrTyped(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
    Annotations
    @inline()
  101. final def typed(tree: Global.Tree, mode: Mode): Global.Tree
    Annotations
    @inline()
  102. final def typed(tree: Global.Tree, pt: Global.Type): Global.Tree

    Types expression tree with given prototype pt.

    Types expression tree with given prototype pt.

    Annotations
    @inline()
  103. final def typed(tree: Global.Tree): Global.Tree

    Types expression or definition tree.

    Types expression or definition tree.

    Annotations
    @inline()
  104. def typed(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
  105. def typed1(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
  106. def typedAnnotation(ann: Global.Tree, mode: Mode = EXPRmode): Global.AnnotationInfo

    Convert an annotation constructor call into an AnnotationInfo.

  107. def typedArg(arg: Global.Tree, mode: Mode, newmode: Mode, pt: Global.Type): Global.Tree
  108. def typedArgs(args: List[Global.Tree], mode: Mode): collection.immutable.List[Global.Tree]
  109. def typedArgsForFormals(args: List[Global.Tree], formals: List[Global.Type], mode: Mode): List[Global.Tree]
    Definition Classes
    PatternTyper
  110. def typedBlock(block0: Global.Block, mode: Mode, pt: Global.Type): Global.Block
  111. final def typedByValueExpr(tree: Global.Tree, pt: Global.Type = WildcardType): Global.Tree
    Annotations
    @inline()
  112. def typedCase(cdef: Global.CaseDef, pattpe: Global.Type, pt: Global.Type): Global.CaseDef
  113. def typedCases(cases: List[Global.CaseDef], pattp: Global.Type, pt: Global.Type): List[Global.CaseDef]
  114. def typedClassDef(cdef: Global.ClassDef): Global.Tree
  115. def typedClassOf(tree: Global.Tree, tpt: Global.Tree, noGen: Boolean = false): Global.Tree
  116. def typedConstructorPattern(fun0: Global.Tree, pt: Global.Type): Global.Tree
    Definition Classes
    PatternTyper
  117. def typedDefDef(ddef: Global.DefDef): Global.DefDef
  118. def typedDocDef(docDef: Global.DocDef, mode: Mode, pt: Global.Type): Global.Tree
  119. def typedEtaExpansion(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
  120. def typedExistentialTypeTree(tree: Global.ExistentialTypeTree, mode: Mode): Global.Tree
    Attributes
    protected
  121. def typedHigherKindedType(tree: Global.Tree, mode: Mode): Global.Tree
  122. def typedHigherKindedType(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Types a higher-kinded type tree -- pt denotes the expected kind and must be one of Kind.WildCard and Kind.FromParams

  123. def typedImport(imp: Global.Import): Global.Import
  124. def typedInPattern(tree: Global.Typed, mode: Mode, pt: Global.Type): Global.Tree
    Attributes
    protected
    Definition Classes
    PatternTyper
  125. def typedLabelDef(ldef: Global.LabelDef): Global.LabelDef
  126. def typedMacroAnnotation(cdef: Global.ClassDef): Global.ClassDef
  127. def typedMatch(selector: Global.Tree, cases: List[Global.CaseDef], mode: Mode, pt: Global.Type, tree: Global.Tree = EmptyTree): Global.Match
  128. def typedModifiers(mods: Global.Modifiers): Global.Modifiers

    Remove definition annotations from modifiers (they have been saved into the symbol's annotations in the type completer / namer)

    Remove definition annotations from modifiers (they have been saved into the symbol's annotations in the type completer / namer)

    However reification does need annotation definitions to proceed. Unfortunately, AnnotationInfo doesn't provide enough info to reify it in general case. The biggest problem is with the "atp: Type" field, which cannot be reified in some situations that involve locally defined annotations. See more about that in Reifiers.scala.

    That's why the original tree gets saved into original field of AnnotationInfo (happens elsewhere). The field doesn't get pickled/unpickled and exists only during a single compilation run. This simultaneously allows us to reify annotations and to preserve backward compatibility.

  129. def typedModuleDef(mdef: Global.ModuleDef): Global.Tree
  130. final def typedOperator(tree: Global.Tree): Global.Tree

    Types function part of an application

    Types function part of an application

    Annotations
    @inline()
  131. final def typedPackageQualifier(tree: Global.Tree): Global.Tree
    Annotations
    @inline()
  132. def typedParentTypes(templ: Global.Template): List[Global.Tree]
  133. def typedPattern(tree: Global.Tree, pt: Global.Type): Global.Tree

    Types a pattern with prototype pt

  134. def typedPos(pos: Global.Position)(tree: Global.Tree): Global.Tree
  135. def typedPos(pos: Global.Position, mode: Mode, pt: Global.Type)(tree: Global.Tree): Global.Tree
  136. final def typedQualifier(tree: Global.Tree): Global.Tree
    Annotations
    @inline()
  137. final def typedQualifier(tree: Global.Tree, mode: Mode): Global.Tree

    Types qualifier tree of a select node.

    Types qualifier tree of a select node. E.g. is tree occurs in a context like tree.m.

    Annotations
    @inline()
  138. final def typedQualifier(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Types qualifier tree of a select node.

    Types qualifier tree of a select node. E.g. is tree occurs in a context like tree.m.

    Annotations
    @inline()
  139. def typedRefinement(templ: Global.Template): Unit
  140. def typedStarInPattern(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree
    Attributes
    protected
    Definition Classes
    PatternTyper
  141. def typedStats(stats: List[Global.Tree], exprOwner: Global.Symbol, warnPure: Boolean = true): List[Global.Tree]
  142. def typedTemplate(templ0: Global.Template, parents1: List[Global.Tree]): Global.Template
  143. def typedType(tree: Global.Tree): Global.Tree

    Types a (fully parameterized) type tree

  144. def typedType(tree: Global.Tree, mode: Mode): Global.Tree

    Types a (fully parameterized) type tree

  145. def typedTypeApply(tree: Global.Tree, mode: Mode, fun: Global.Tree, args: List[Global.Tree]): Global.Tree
    Attributes
    protected
  146. def typedTypeConstructor(tree: Global.Tree): Global.Tree
  147. def typedTypeConstructor(tree: Global.Tree, mode: Mode): Global.Tree

    Types a type constructor tree used in a new or supertype

  148. def typedTypeDef(tdef: Global.TypeDef): Global.TypeDef
  149. def typedValDef(vdef: Global.ValDef): Global.ValDef
  150. final def typerWithCondLocalContext[T](c: => Analyzer.Context)(cond: Boolean)(f: (Analyzer.Typer) => T): T
    Annotations
    @inline()
  151. final def typerWithLocalContext[T](c: Analyzer.Context)(f: (Analyzer.Typer) => T): T
    Annotations
    @inline()
  152. def validateParentClasses(parents: List[Global.Tree], selfType: Global.Type): Unit

    Check that

    Check that

    • all parents are class types,
    • first parent class is not a mixin; following classes are mixins,
    • final classes are not inherited,

    - sealed classes are only inherited by classes which are nested within definition of base class, or that occur within same statement sequence,

    • self-type of current class is a subtype of self-type of each parent class.
    • no two parents define same symbol.
  153. def viewExists(from: Global.Type, to: Global.Type): Boolean
  154. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  155. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  156. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  157. def warnTypeParameterShadow(tparams: List[Global.TypeDef], sym: Global.Symbol): Unit
    Definition Classes
    TyperDiagnostics
  158. final def withCondConstrTyper[T](inConstr: Boolean)(f: (Analyzer.Typer) => T): T
    Annotations
    @inline()
  159. def wrapClassTagUnapply(uncheckedPattern: Global.Tree, classTagExtractor: Global.Tree, pt: Global.Type): Global.Tree
    Definition Classes
    PatternTyper
  160. object nonpatternQualifierTraverser extends QualifierTraverser
  161. object packageQualifierTraverser extends Global.Traverser
  162. object patternQualifierTraverser extends QualifierTraverser

Deprecated Value Members

  1. def member(qual: Global.Tree, name: Global.Name): Global.Symbol
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.9) Use the overload accepting a Type.

  2. def [B](y: B): (Analyzer.Typer, B)
    Implicit
    This member is added by an implicit conversion from Analyzer.Typer toArrowAssoc[Analyzer.Typer] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Analyzer.PatternTyper

Inherited from Analyzer.Tag

Inherited from Analyzer.Adaptation

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromAnalyzer.Typer to any2stringadd[Analyzer.Typer]

Inherited by implicit conversion StringFormat fromAnalyzer.Typer to StringFormat[Analyzer.Typer]

Inherited by implicit conversion Ensuring fromAnalyzer.Typer to Ensuring[Analyzer.Typer]

Inherited by implicit conversion ArrowAssoc fromAnalyzer.Typer to ArrowAssoc[Analyzer.Typer]

Ungrouped