scala.tools.nsc.doc.ScaladocAnalyzer

ScaladocTyper

class ScaladocTyper extends Typer

Source
ScaladocGlobal.scala
Linear Supertypes
ScaladocAnalyzer.Typer, ScaladocAnalyzer.TyperContextErrors, ScaladocAnalyzer.Tag, ScaladocAnalyzer.Adaptation, ScaladocAnalyzer.TyperDiagnostics, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScaladocTyper
  2. Typer
  3. TyperContextErrors
  4. Tag
  5. Adaptation
  6. TyperDiagnostics
  7. AnyRef
  8. Any
Implicitly
  1. by StringAdd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScaladocTyper(context0: ScaladocAnalyzer.Context)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to StringAdd[ScaladocTyper] performed by method StringAdd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (ScaladocTyper, B)

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to ArrowAssoc[ScaladocTyper] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. object TyperErrorGen

    Definition Classes
    TyperContextErrors
  9. 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.

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

    Attributes
    protected
    Definition Classes
    Typer
  10. def adaptCase(cdef: Global.CaseDef, mode: Mode, tpe: Global.Type): Global.CaseDef

    Definition Classes
    Typer
  11. def adaptToArguments(qual: Global.Tree, name: Global.Name, args: List[Global.Tree], pt: Global.Type, reportAmbiguous: Boolean, saveErrors: Boolean): 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.

    Definition Classes
    Typer
  12. def adaptToMember(qual: Global.Tree, searchTemplate: Global.Type, reportAmbiguous: Boolean = true, saveErrors: Boolean = true): Global.Tree

    Definition Classes
    Typer
  13. def adaptToMemberWithArgs(tree: Global.Tree, qual: Global.Tree, name: Global.Name, mode: Mode, reportAmbiguous: Boolean, saveErrors: Boolean): 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.

    Definition Classes
    Typer
  14. 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.

    Definition Classes
    Typer
  15. def applyImplicitArgs(fun: Global.Tree): Global.Tree

    Find implicit arguments and pass them to given tree.

    Find implicit arguments and pass them to given tree.

    Definition Classes
    Typer
  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def atOwner(tree: Global.Tree, owner: Global.Symbol): ScaladocAnalyzer.Typer

    Definition Classes
    Typer
  18. def atOwner(owner: Global.Symbol): ScaladocAnalyzer.Typer

    Definition Classes
    Typer
  19. def callToCompanionConstr(context: ScaladocAnalyzer.Context, calledFun: Global.Symbol): Boolean

    Definition Classes
    Typer
  20. def checkClassType(tpt: Global.Tree): Boolean

    Check that tpt refers to a non-refinement class type

    Check that tpt refers to a non-refinement class type

    Definition Classes
    Typer
  21. object checkDead

    Definition Classes
    TyperDiagnostics
  22. def checkExistentialsFeature(pos: Global.Position, tpe: Global.Type, prefix: String): AnyVal

    Definition Classes
    Typer
  23. 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

    Definition Classes
    Typer
  24. def checkFinitary(classinfo: Global.ClassInfoType): Unit

    Definition Classes
    Typer
  25. 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
    Definition Classes
    Typer
  26. object checkNoEscaping extends Global.TypeMap

    Check that type of given tree does not contain local or private components.

  27. def checkNonCyclic(defn: Global.Tree, tpt: Global.Tree): Unit

    Definition Classes
    Typer
  28. def checkNonCyclic(sym: Global.Symbol): Unit

    Definition Classes
    Typer
  29. def checkNonCyclic(pos: Global.Position, tp: Global.Type, lockedSym: Global.Symbol): Boolean

    Definition Classes
    Typer
  30. def checkNonCyclic(pos: Global.Position, tp: Global.Type): Boolean

    Check that type tp is not a subtype of itself.

    Check that type tp is not a subtype of itself.

    Definition Classes
    Typer
  31. def checkParamsConvertible(tree: Global.Tree, tpe0: Global.Type): Unit

    Definition Classes
    Typer
  32. def checkStable(tree: Global.Tree): Global.Tree

    Check that tree is a stable expression.

    Check that tree is a stable expression.

    Definition Classes
    Typer
  33. def checkStablePrefixClassType(tpt: Global.Tree): Boolean

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

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

    Definition Classes
    Typer
  34. object checkUnused

    Definition Classes
    TyperDiagnostics
  35. def checkValidAdaptation(t: Global.Tree, args: List[Global.Tree]): Boolean

    Definition Classes
    Adaptation
  36. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  37. def computeMacroDefType(tree: Global.Tree, pt: Global.Type): Global.Type

    Definition Classes
    Typer
  38. def computeParamAliases(clazz: Global.Symbol, vparamss: List[List[Global.ValDef]], rhs: Global.Tree): Unit

    Enter all aliases of local parameter accessors.

    Enter all aliases of local parameter accessors.

    Definition Classes
    Typer
  39. def computeType(tree: Global.Tree, pt: Global.Type): Global.Type

    Definition Classes
    Typer
  40. final def constrTyperIf(inConstr: Boolean): ScaladocAnalyzer.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.

    Definition Classes
    Typer
  41. var context: ScaladocAnalyzer.Context

    Definition Classes
    Typer
  42. def context1: ScaladocAnalyzer.Context

    Definition Classes
    Typer
  43. 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
  44. def defineUseCases(useCase: Global.UseCase): List[Global.Symbol]

  45. final def deindentTyping(): Unit

    Definition Classes
    Typer
  46. def doTypedApply(tree: Global.Tree, fun0: Global.Tree, args: List[Global.Tree], mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  47. def doTypedUnapply(tree: Global.Tree, fun0: Global.Tree, fun: Global.Tree, args: List[Global.Tree], mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  48. def dropExistential(tp: Global.Type): Global.Type

    Definition Classes
    Typer
  49. object dyna

    Definition Classes
    Typer
  50. def ensuring(cond: (ScaladocTyper) ⇒ Boolean, msg: ⇒ Any): ScaladocTyper

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to Ensuring[ScaladocTyper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  51. def ensuring(cond: (ScaladocTyper) ⇒ Boolean): ScaladocTyper

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to Ensuring[ScaladocTyper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  52. def ensuring(cond: Boolean, msg: ⇒ Any): ScaladocTyper

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to Ensuring[ScaladocTyper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  53. def ensuring(cond: Boolean): ScaladocTyper

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to Ensuring[ScaladocTyper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  54. def enterSym(txt: ScaladocAnalyzer.Context, tree: Global.Tree): ScaladocAnalyzer.Context

    Attributes
    protected
    Definition Classes
    Typer
  55. def enterSyms(txt: ScaladocAnalyzer.Context, trees: List[Global.Tree]): Unit

    Attributes
    protected
    Definition Classes
    Typer
  56. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  58. def existentialBoundsExcludingHidden(hidden: List[Global.Symbol]): Map[Global.Symbol, Global.Type]

    If we map a set of hidden symbols to their existential bounds, we have a problem: the bounds may themselves contain references to the hidden symbols.

    If we map a set of hidden symbols to their existential bounds, we have a problem: the bounds may themselves contain references to the hidden symbols. So this recursively calls existentialBound until the typeSymbol is not amongst the symbols being hidden.

    Definition Classes
    Typer
  59. def existentialTransform[T](rawSyms: List[Global.Symbol], tp: Global.Type)(creator: (List[Global.Symbol], Global.Type) ⇒ T): T

    Given a set rawSyms of term- and type-symbols, and a type tp, produce a set of fresh type parameters and a type so that it can be abstracted to an existential type.

    Given a set rawSyms of term- and type-symbols, and a type tp, produce a set of fresh type parameters and a type so that it can be abstracted to an existential type. Every type symbol T in rawSyms is mapped to a clone. Every term symbol x of type T in rawSyms is given an associated type symbol of the following form:

    type x.type <: T with Singleton

    The name of the type parameter is x.type, to produce nice diagnostics. The Singleton parent ensures that the type parameter is still seen as a stable type. Type symbols in rawSyms are fully replaced by the new symbols. Term symbols are also replaced, except for term symbols of an Ident tree, where only the type of the Ident is changed.

    Attributes
    protected
    Definition Classes
    Typer
  60. def extractorForUncheckedType(pos: Global.Position, pt: Global.Type): Option[Global.Tree]

    Definition Classes
    Typer
  61. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  62. def finishMethodSynthesis(templ: Global.Template, clazz: Global.Symbol, context: ScaladocAnalyzer.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
    Definition Classes
    Typer
  63. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to StringFormat[ScaladocTyper] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  64. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  65. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  66. final def indentTyping(): Unit

    Definition Classes
    Typer
  67. val infer: ScaladocAnalyzer.Inferencer

    Definition Classes
    Typer
  68. def inferView(tree: Global.Tree, from: Global.Type, to: Global.Type, reportAmbiguous: Boolean, saveErrors: Boolean): 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.

    Definition Classes
    Typer
  69. def inferView(tree: Global.Tree, from: Global.Type, to: Global.Type, reportAmbiguous: Boolean): Global.Tree

    Definition Classes
    Typer
  70. def instantiate(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  71. 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.

    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.

    Definition Classes
    Typer
  72. def isCapturedExistential(sym: Global.Symbol): Boolean

    Definition Classes
    Typer
  73. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  74. def isNamedApplyBlock(tree: Global.Tree): Boolean

    Is tree a block created by a named application?

    Is tree a block created by a named application?

    Definition Classes
    Typer
  75. def isRawParameter(sym: Global.Symbol): Boolean

    Definition Classes
    Typer
  76. def isReferencedFrom(ctx: ScaladocAnalyzer.Context, sym: Global.Symbol): Boolean

    Definition Classes
    Typer
  77. def isStableExceptVolatile(tree: Global.Tree): Boolean

    Would tree be a stable (i.

    Would tree be a stable (i.e. a pure expression) if the type of its symbol was not volatile?

    Attributes
    protected
    Definition Classes
    Typer
  78. 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.

    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.

    Definition Classes
    Typer
  79. def labelTyper(ldef: Global.LabelDef): ScaladocAnalyzer.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.

    Definition Classes
    Typer
  80. def member(qual: Global.Tree, name: Global.Name): Global.Symbol

    The member with given name of given qualifier tree

    The member with given name of given qualifier tree

    Definition Classes
    Typer
  81. def namer: ScaladocAnalyzer.Namer

    Definition Classes
    Typer
  82. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  83. 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?

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

    Definition Classes
    Typer
  84. final def notify(): Unit

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

    Definition Classes
    AnyRef
  86. def packCaptured(tpe: Global.Type): Global.Type

    Definition Classes
    Typer
  87. def packSymbols(hidden: List[Global.Symbol], tp: Global.Type): Global.Type

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

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

    Definition Classes
    Typer
  88. def packedType(tree: Global.Tree, owner: Global.Symbol): Global.Type

    convert local symbols and skolems to existentials

    convert local symbols and skolems to existentials

    Definition Classes
    Typer
  89. def permanentlyHiddenWarning(pos: Global.Position, hidden: Global.Name, defn: Global.Symbol): Unit

    Definition Classes
    TyperDiagnostics
  90. final def printInference(s: ⇒ String): Unit

    Definition Classes
    Typer
    Annotations
    @inline()
  91. final def printTyping(s: ⇒ String): Unit

    Definition Classes
    Typer
    Annotations
    @inline()
  92. def probeTypeConstructor(tree: Global.Tree): (Global.Symbol, Global.Tree)

    Definition Classes
    Typer
  93. def ptOrLub(tps: List[Global.Type], pt: Global.Type): (Global.Type, Boolean)

    Definition Classes
    Typer
  94. def ptOrLubPacked(trees: List[Global.Tree], pt: Global.Type): (Global.Type, Boolean)

    Definition Classes
    Typer
  95. def qualifyingClass(tree: Global.Tree, qual: Global.Name, packageOK: 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

    Definition Classes
    Typer
  96. def reallyExists(sym: Global.Symbol): Boolean

    Is symbol defined and not stale?

    Is symbol defined and not stale?

    Definition Classes
    Typer
  97. def reenterTypeParams(tparams: List[Global.TypeDef]): List[Global.Symbol]

    Definition Classes
    Typer
  98. def reenterValueParams(vparamss: List[List[Global.ValDef]]): Unit

    Definition Classes
    Typer
  99. def reportTypeError(context0: ScaladocAnalyzer.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
  100. 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, IntClass.tpe) 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.

    Definition Classes
    Tag
  101. 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, IntClass.tpe, 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.

    Definition Classes
    Tag
  102. 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.

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

    Definition Classes
    Typer
  103. def silent[T](op: (ScaladocAnalyzer.Typer) ⇒ T, reportAmbiguousErrors: Boolean = context.ambiguousErrors, newtree: Global.Tree = context.tree): ScaladocAnalyzer.SilentResult[T]

    Definition Classes
    Typer
  104. def stabilizeFun(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  105. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  106. def synthesizePartialFunction(paramName: Global.TermName, paramPos: Global.Position, 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

    Definition Classes
    Typer
  107. def toString(): String

    Definition Classes
    AnyRef → Any
  108. def transformedOr(tree: Global.Tree, op: ⇒ Global.Tree): Global.Tree

    Definition Classes
    Typer
  109. def transformedOrTyped(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  110. def typed(tree: Global.Tree, pt: Global.Type): Global.Tree

    Types expression tree with given prototype pt.

    Types expression tree with given prototype pt.

    Definition Classes
    Typer
  111. def typed(tree: Global.Tree): Global.Tree

    Types expression or definition tree.

    Types expression or definition tree.

    Definition Classes
    Typer
  112. def typed(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  113. def typed1(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  114. def typedAnnotation(ann: Global.Tree, mode: Mode = EXPRmode, selfsym: Global.Symbol = NoSymbol): Global.AnnotationInfo

    Convert an annotation constructor call into an AnnotationInfo.

    Convert an annotation constructor call into an AnnotationInfo.

    Definition Classes
    Typer
  115. def typedArg(arg: Global.Tree, mode: Mode, newmode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  116. def typedArgs(args0: List[Global.Tree], mode: Mode, formals0: List[Global.Type], adapted0: List[Global.Type]): List[Global.Tree]

    Type trees in args0 against corresponding expected type in adapted0.

    Type trees in args0 against corresponding expected type in adapted0.

    The mode in which each argument is typed is derived from mode and whether the arg was originally by-name or var-arg (need formals0 for that) the default is by-val, of course.

    (docs reverse-engineered -- AM)

    Definition Classes
    Typer
  117. def typedArgs(args: List[Global.Tree], mode: Mode): collection.immutable.List[Global.Tree]

    Definition Classes
    Typer
  118. def typedBlock(block: Global.Block, mode: Mode, pt: Global.Type): Global.Block

    Definition Classes
    Typer
  119. def typedCase(cdef: Global.CaseDef, pattpe: Global.Type, pt: Global.Type): Global.CaseDef

    Definition Classes
    Typer
  120. def typedCases(cases: List[Global.CaseDef], pattp: Global.Type, pt: Global.Type): List[Global.CaseDef]

    Definition Classes
    Typer
  121. def typedClassDef(cdef0: Global.ClassDef): Global.Tree

    Definition Classes
    Typer
  122. def typedClassOf(tree: Global.Tree, tpt: Global.Tree, noGen: Boolean = false): Global.Tree

    Definition Classes
    Typer
  123. def typedDefDef(ddef: Global.DefDef): Global.DefDef

    Definition Classes
    Typer
  124. def typedDocDef(docDef: Global.DocDef, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    ScaladocTyperTyper
  125. def typedExistentialTypeTree(tree: Global.ExistentialTypeTree, mode: Mode): Global.Tree

    Attributes
    protected
    Definition Classes
    Typer
  126. def typedHigherKindedType(tree: Global.Tree, mode: Mode): Global.Tree

    Definition Classes
    Typer
  127. def typedHigherKindedType(tree: Global.Tree, mode: Mode, pt: Global.Type): Global.Tree

    Types a higher-kinded type tree -- pt denotes the expected kind

    Types a higher-kinded type tree -- pt denotes the expected kind

    Definition Classes
    Typer
  128. def typedImport(imp: Global.Import): Global.Import

    Definition Classes
    Typer
  129. def typedLabelDef(ldef: Global.LabelDef): Global.LabelDef

    Definition Classes
    Typer
  130. def typedMatch(selector: Global.Tree, cases: List[Global.CaseDef], mode: Mode, pt: Global.Type, tree: Global.Tree = EmptyTree): Global.Match

    Definition Classes
    Typer
  131. 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.

    Definition Classes
    Typer
  132. def typedModuleDef(mdef0: Global.ModuleDef): Global.Tree

    Definition Classes
    Typer
  133. def typedOperator(tree: Global.Tree): Global.Tree

    Types function part of an application

    Types function part of an application

    Definition Classes
    Typer
  134. def typedParentType(encodedtpt: Global.Tree, templ: Global.Template, inMixinPosition: Boolean): Global.Tree

    Typechecks a parent type reference.

    Typechecks a parent type reference.

    This typecheck is harder than it might look, because it should honor early definitions and also perform type argument inference with the help of super call arguments provided in encodedtpt.

    The method is called in batches (batch = 1 time per each parent type referenced), two batches per definition: once from namer, when entering a ClassDef or a ModuleDef and once from typer, when typechecking the definition.

    ***Arguments***

    encodedtpt represents the parent type reference wrapped in an Apply node which indicates value arguments (i.e. type macro arguments or super constructor call arguments) If no value arguments are provided by the user, the Apply node is still there, but its args will be set to Nil. This argument is synthesized by tools.nsc.ast.Parsers.templateParents.

    templ is an enclosing template, which contains a primary constructor synthesized by the parser. Such a constructor is a DefDef which contains early initializers and maybe a super constructor call (I wrote "maybe" because trait constructors don't call super constructors). This argument is synthesized by tools.nsc.ast.Trees.Template.

    inMixinPosition indicates whether the reference is not the first in the list of parents (and therefore cannot be a class) or the opposite.

    ***Return value and side effects***

    Returns a TypeTree representing a resolved parent type. If the typechecked parent reference implies non-nullary and non-empty argument list, this argument list is attached to the returned value in SuperArgsAttachment. The attachment is necessary for the subsequent typecheck to fixup a super constructor call in the body of the primary constructor (see typedTemplate for details).

    This method might invoke typedPrimaryConstrBody, hence it might cause the side effects described in the docs of that method. It might also attribute the Super(_, _) reference (if present) inside the primary constructor of templ.

    ***Example***

    For the following definition:

    class D extends { val x = 2 val y = 4 } with B(x)(3) with C(y) with T

    this method will be called six times:

    (3 times from the namer) typedParentType(Apply(Apply(Ident(B), List(Ident(x))), List(3)), templ, inMixinPosition = false) typedParentType(Apply(Ident(C), List(Ident(y))), templ, inMixinPosition = true) typedParentType(Apply(Ident(T), List()), templ, inMixinPosition = true)

    (3 times from the typer) <the same three calls>

    Definition Classes
    Typer
  135. def typedParentTypes(templ: Global.Template): List[Global.Tree]

    Definition Classes
    Typer
  136. def typedPattern(tree: Global.Tree, pt: Global.Type): Global.Tree

    Types a pattern with prototype pt

    Types a pattern with prototype pt

    Definition Classes
    Typer
  137. def typedPos(pos: Global.Position)(tree: Global.Tree): Global.Tree

    Definition Classes
    Typer
  138. def typedPos(pos: Global.Position, mode: Mode, pt: Global.Type)(tree: Global.Tree): Global.Tree

    Definition Classes
    Typer
  139. def typedPrimaryConstrBody(templ: Global.Template)(actualSuperCall: ⇒ Global.Tree): Global.Tree

    Typechecks the mishmash of trees that happen to be stuffed into the primary constructor of a given template.

    Typechecks the mishmash of trees that happen to be stuffed into the primary constructor of a given template. Before commencing the typecheck, replaces the pendingSuperCall dummy with the result of actualSuperCall. actualSuperCall can return EmptyTree, in which case the dummy is replaced with a literal unit.

    ***Return value and side effects***

    If a super call is present in the primary constructor and is not erased by the transform, returns it typechecked. Otherwise (e.g. if the primary constructor is missing or the super call isn't there) returns EmptyTree.

    As a side effect, this method attributes the underlying fields of early vals. Early vals aren't typechecked anywhere else, so it's essential to call typedPrimaryConstrBody at least once per definition. It'd be great to disentangle this logic at some point.

    ***Example***

    For the following definition:

    class D extends { val x = 2 val y = 4 } with B(x)(3) with C(y) with T

    the primary constructor of templ will be:

    Block(List( ValDef(NoMods, x, TypeTree(), 2) ValDef(NoMods, y, TypeTree(), 4) global.pendingSuperCall, Literal(Constant(())))

    Note the pendingSuperCall part. This is the representation of a fill-me-in-later supercall dummy, which encodes the fact that supercall argss are unknown during parsing and need to be transplanted from one of the parent types. Read more about why the argss are unknown in tools.nsc.ast.Trees.Template.

    Definition Classes
    Typer
  140. def typedQualifier(tree: Global.Tree): Global.Tree

    Definition Classes
    Typer
  141. 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.

    Definition Classes
    Typer
  142. 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.

    Definition Classes
    Typer
  143. def typedRefinement(templ: Global.Template): Unit

    Definition Classes
    Typer
  144. def typedStats(stats: List[Global.Tree], exprOwner: Global.Symbol): List[Global.Tree]

    Definition Classes
    Typer
  145. def typedTemplate(templ: Global.Template, parents1: List[Global.Tree]): Global.Template

    Check that inner classes do not inherit from Annotation

    Check that inner classes do not inherit from Annotation

    Definition Classes
    Typer
  146. def typedType(tree: Global.Tree): Global.Tree

    Types a (fully parameterized) type tree

    Types a (fully parameterized) type tree

    Definition Classes
    Typer
  147. def typedType(tree: Global.Tree, mode: Mode): Global.Tree

    Types a (fully parameterized) type tree

    Types a (fully parameterized) type tree

    Definition Classes
    Typer
  148. def typedTypeApply(tree: Global.Tree, mode: Mode, fun: Global.Tree, args: List[Global.Tree]): Global.Tree

    Attributes
    protected
    Definition Classes
    Typer
  149. def typedTypeConstructor(tree: Global.Tree): Global.Tree

    Definition Classes
    Typer
  150. def typedTypeConstructor(tree: Global.Tree, mode: Mode): Global.Tree

    Types a type constructor tree used in a new or supertype

    Types a type constructor tree used in a new or supertype

    Definition Classes
    Typer
  151. def typedTypeDef(tdef: Global.TypeDef): Global.TypeDef

    Definition Classes
    Typer
  152. def typedValDef(vdef: Global.ValDef): Global.ValDef

    Definition Classes
    Typer
  153. final def typerReportAnyContextErrors[T](c: ScaladocAnalyzer.Context)(f: (ScaladocAnalyzer.Typer) ⇒ T): T

    Definition Classes
    Typer
    Annotations
    @inline()
  154. final def typerWithCondLocalContext[T](c: ⇒ ScaladocAnalyzer.Context)(cond: Boolean)(f: (ScaladocAnalyzer.Typer) ⇒ T): T

    Definition Classes
    Typer
    Annotations
    @inline()
  155. final def typerWithLocalContext[T](c: ScaladocAnalyzer.Context)(f: (ScaladocAnalyzer.Typer) ⇒ T): T

    Definition Classes
    Typer
    Annotations
    @inline()
  156. 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.
    Definition Classes
    Typer
  157. def virtualizedMatch(match_: Global.Match, mode: Mode, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  158. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  161. final def withCondConstrTyper[T](inConstr: Boolean)(f: (ScaladocAnalyzer.Typer) ⇒ T): T

    Definition Classes
    Typer
    Annotations
    @inline()
  162. final def withSavedContext[T](c: ScaladocAnalyzer.Context)(f: ⇒ T): T

    Definition Classes
    Typer
    Annotations
    @inline()
  163. def wrapClassTagUnapply(uncheckedPattern: Global.Tree, classTagExtractor: Global.Tree, pt: Global.Type): Global.Tree

    Definition Classes
    Typer
  164. final val xtypes: Boolean(false)

    Definition Classes
    Typer
  165. def [B](y: B): (ScaladocTyper, B)

    Implicit information
    This member is added by an implicit conversion from ScaladocTyper to ArrowAssoc[ScaladocTyper] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from ScaladocAnalyzer.Typer

Inherited from ScaladocAnalyzer.TyperContextErrors

Inherited from ScaladocAnalyzer.Tag

Inherited from ScaladocAnalyzer.Adaptation

Inherited from ScaladocAnalyzer.TyperDiagnostics

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion StringAdd from ScaladocTyper to StringAdd[ScaladocTyper]

Inherited by implicit conversion StringFormat from ScaladocTyper to StringFormat[ScaladocTyper]

Inherited by implicit conversion Ensuring from ScaladocTyper to Ensuring[ScaladocTyper]

Inherited by implicit conversion ArrowAssoc from ScaladocTyper to ArrowAssoc[ScaladocTyper]

Ungrouped