scala.tools.nsc.transform.Erasure

Eraser

class Eraser extends Typer

The modifier typer which retypes with erased types.

Source
Erasure.scala
Linear Supertypes
Typer, TyperDiagnostics, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Eraser
  2. Typer
  3. TyperDiagnostics
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Eraser(context: 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. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. def adapt(tree: Tree, mode: Int, pt: Type, original: Tree = EmptyTree): Tree

    A replacement for the standard typer's adapt method.

    A replacement for the standard typer's adapt method.

    Attributes
    protected
    Definition Classes
    EraserTyper
  7. def adaptToArguments(qual: Tree, name: Name, args: List[Tree], pt: Type): 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'. If pt' is defined, there is a fallback to try again with 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
  8. def adaptToMember(qual: Tree, searchTemplate: Type): Tree

    Definition Classes
    Typer
  9. def adaptToMemberWithArgs(tree: Tree, qual: Tree, name: Name, mode: Int): Tree

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

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

    Definition Classes
    Typer
  10. def adaptToName(qual: Tree, name: Name): Tree

    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.

    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
  11. def addGetterSetter(stat: Tree): List[Tree]

    stat

    ...

    returns

    ...

    Definition Classes
    Typer
  12. def applyImplicitArgs(fun: Tree): Tree

    Find implicit arguments and pass them to given tree.

    Find implicit arguments and pass them to given tree.

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

    Definition Classes
    Any
  14. def atOwner(tree: Tree, owner: Symbol): Typer

    Definition Classes
    Typer
  15. def atOwner(owner: Symbol): Typer

    Definition Classes
    Typer
  16. def callToCompanionConstr(context: Context, calledFun: Symbol): Boolean

    Definition Classes
    Typer
  17. def checkClassType(tpt: Tree, existentialOK: Boolean, stablePrefix: Boolean): Unit

    Check that tpt' refers to a non-refinement class type

    Check that tpt' refers to a non-refinement class type

    Definition Classes
    Typer
  18. object checkDead extends AnyRef

  19. def checkFinitary(classinfo: ClassInfoType): Unit

    Definition Classes
    Typer
  20. def checkMethodStructuralCompatible(meth: Symbol): Unit

    Check if a method is defined in such a way that it can be called.

    Check if a method is defined in such a way that it can be called. A method cannot be called if it is a non-private member of a structural type and if its parameter's types are not one of - this.type - a type member of the structural type - an abstract type declared outside of the structural type.

    Definition Classes
    Typer
  21. object checkNoEscaping extends TypeMap

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

  22. def checkNonCyclic(defn: Tree, tpt: Tree): Unit

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

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

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

    Check that type tp is not a subtype of itself.

    Check that type tp is not a subtype of itself.

    pos

    ...

    tp

    ...

    returns

    true if tp is not a subtype of itself.

    Definition Classes
    Typer
  26. def checkParamsConvertible(pos: Position, tpe: Type): Unit

    Definition Classes
    Typer
  27. def checkStable(tree: Tree): Tree

    Check that tree is a stable expression.

    Check that tree is a stable expression.

    tree

    ...

    returns

    ...

    Definition Classes
    Typer
  28. def checkStarPatOK(pos: Position, mode: Int): Unit

    Definition Classes
    Typer
  29. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  30. def computeParamAliases(clazz: Symbol, vparamss: List[List[ValDef]], rhs: Tree): Unit

    Enter all aliases of local parameter accessors.

    Enter all aliases of local parameter accessors.

    clazz

    ...

    vparamss

    ...

    rhs

    ...

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

    Definition Classes
    Typer
  32. def constrTyperIf(inConstr: Boolean): 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
  33. def context1: Context

    Definition Classes
    Typer
  34. def cyclicAdjective(sym: Symbol): String

    Definition Classes
    TyperDiagnostics
  35. def cyclicReferenceMessage(sym: Symbol, tree: 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
  36. final def deindentTyping(): Unit

    Definition Classes
    Typer
    Annotations
    @inline()
  37. def doTypedApply(tree: Tree, fun0: Tree, args: List[Tree], mode: Int, pt: Type): Tree

    Definition Classes
    Typer
  38. def enterSym(txt: Context, tree: Tree): Context

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

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

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

    Definition Classes
    AnyRef → Any
  42. def existentialTransform(rawSyms: List[Symbol], tp: Type): (List[Symbol], 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.

    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
  43. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  44. def findManifest(tp: Type, full: Boolean): SearchResult

    Definition Classes
    Typer
  45. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  46. def getManifestTree(pos: Position, tp: Type, full: Boolean): Tree

    Definition Classes
    Typer
  47. def hashCode(): Int

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

    Definition Classes
    Typer
    Annotations
    @inline()
  49. val infer: Inferencer

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

    Definition Classes
    Typer
  51. def instantiate(tree: Tree, mode: Int, pt: Type): Tree

    tree

    ...

    mode

    ...

    pt

    ...

    returns

    ...

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

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

    Is tree' a block created by a named application?

    Is tree' a block created by a named application?

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

    Definition Classes
    Typer
  55. def isStale(sym: 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
  56. def labelTyper(ldef: LabelDef): 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
  57. def member(qual: Tree, name: Name): Symbol

    The member with given name of given qualifier tree

    The member with given name of given qualifier tree

    Definition Classes
    Typer
  58. def memberAnnots(annots: List[AnnotationInfo], memberClass: Symbol, keepClean: Boolean = false): List[AnnotationInfo]

    The annotations amongst annots that should go on a member of class memberClass (field, getter, setter, beanGetter, beanSetter, param) If 'keepClean' is true, annotations without any meta-annotation are kept

    The annotations amongst annots that should go on a member of class memberClass (field, getter, setter, beanGetter, beanSetter, param) If 'keepClean' is true, annotations without any meta-annotation are kept

    Attributes
    protected
    Definition Classes
    Typer
  59. def namer: Namer

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

    Definition Classes
    AnyRef
  61. def needsInstantiation(tparams: List[Symbol], formals: List[Type], args: List[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
  62. final def notify(): Unit

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

    Definition Classes
    AnyRef
  64. def packSymbols(hidden: List[Symbol], tp: Type): 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
  65. def packedType(tree: Tree, owner: Symbol): Type

    convert skolems to existentials

    convert skolems to existentials

    Definition Classes
    Typer
  66. def parentTypes(templ: Template): List[Tree]

    Definition Classes
    Typer
  67. final def printInference(s: ⇒ String): Unit

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

    Definition Classes
    Typer
    Annotations
    @inline()
  69. def qualifyingClass(tree: Tree, qual: Name, packageOK: Boolean): Symbol

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

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

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

    Is symbol defined and not stale?

    Is symbol defined and not stale?

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

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

    Definition Classes
    Typer
  73. def removeAnnotations(mods: Modifiers): 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)

    Definition Classes
    Typer
  74. def reportTypeError(pos: Position, ex: TypeError): Unit

    Report a type error.

    Report a type error.

    ex

    The exception that caused the error

    Definition Classes
    TyperDiagnostics
  75. def silent[T](op: (Typer) ⇒ T, reportAmbiguousErrors: Boolean, newtree: Tree): Any

    Definition Classes
    Typer
  76. def stabilizeFun(tree: Tree, mode: Int, pt: Type): Tree

    tree

    ...

    mode

    ...

    pt

    ...

    returns

    ...

    Definition Classes
    Typer
  77. def symWasOverloaded(sym: Symbol): Boolean

    Definition Classes
    TyperDiagnostics
  78. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  79. def toString(): String

    Definition Classes
    AnyRef → Any
  80. def transformedOrTyped(tree: Tree, mode: Int, pt: Type): Tree

    Definition Classes
    Typer
  81. def tryBoth(tree: Tree)(op1: (Typer, Tree) ⇒ Tree)(op2: (Typer, Tree) ⇒ Tree): Tree

    Utility method: Try op1 on tree.

    Utility method: Try op1 on tree. If that gives an error try op2 instead.

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

    Types expression tree with given prototype pt.

    Types expression tree with given prototype pt.

    tree

    ...

    pt

    ...

    returns

    ...

    Definition Classes
    Typer
  83. def typed(tree: Tree): Tree

    Types expression or definition tree.

    Types expression or definition tree.

    tree

    ...

    returns

    ...

    Definition Classes
    Typer
  84. def typed(tree: Tree, mode: Int, pt: Type): Tree

    tree

    ...

    mode

    ...

    pt

    ...

    returns

    ...

    Definition Classes
    Typer
  85. def typed1(tree: Tree, mode: Int, pt: Type): Tree

    A replacement for the standard typer's typed1' method.

    A replacement for the standard typer's typed1' method.

    Attributes
    protected
    Definition Classes
    EraserTyper
  86. def typedAnnotation(ann: Tree, mode: Int = EXPRmode, selfsym: Symbol = NoSymbol, annClass: Symbol = AnnotationClass, requireJava: Boolean = false): AnnotationInfo

    Convert an annotation constructor call into an AnnotationInfo.

    Convert an annotation constructor call into an AnnotationInfo.

    annClass

    the expected annotation class

    Definition Classes
    Typer
  87. def typedArg(arg: Tree, mode: Int, newmode: Int, pt: Type): Tree

    Definition Classes
    Typer
  88. def typedArgs(args: List[Tree], mode: Int, originalFormals: List[Type], adaptedFormals: List[Type]): List[Tree]

    Definition Classes
    Typer
  89. def typedArgs(args: List[Tree], mode: Int): List[Tree]

    Definition Classes
    Typer
  90. def typedBlock(block: Block, mode: Int, pt: Type): Block

    block

    ...

    mode

    ...

    pt

    ...

    returns

    ...

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

    cdef

    ...

    pattpe

    ...

    pt

    ...

    returns

    ...

    Definition Classes
    Typer
  92. def typedCases(tree: Tree, cases: List[CaseDef], pattp: Type, pt: Type): List[CaseDef]

    Definition Classes
    Typer
  93. def typedClassDef(cdef: ClassDef): Tree

    cdef

    ...

    returns

    ...

    Definition Classes
    Typer
  94. def typedDefDef(ddef: DefDef): DefDef

    ddef

    ...

    returns

    ...

    Definition Classes
    Typer
  95. def typedExistentialTypeTree(tree: ExistentialTypeTree, mode: Int): Tree

    Attributes
    protected
    Definition Classes
    Typer
  96. def typedFunction(fun: Function, mode: Int, pt: Type): Tree

    fun

    ...

    mode

    ...

    pt

    ...

    returns

    ...

    Definition Classes
    Typer
  97. def typedHigherKindedType(tree: Tree): Tree

    Definition Classes
    Typer
  98. def typedHigherKindedType(tree: Tree, mode: Int): Tree

    Definition Classes
    Typer
  99. def typedHigherKindedType(tree: Tree, mode: Int, pt: Type): 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
  100. def typedImport(imp: Import): Import

    Definition Classes
    Typer
  101. def typedLabelDef(ldef: LabelDef): LabelDef

    Definition Classes
    Typer
  102. def typedModuleDef(mdef: ModuleDef): Tree

    mdef

    ...

    returns

    ...

    Definition Classes
    Typer
  103. def typedOperator(tree: Tree): Tree

    Types function part of an application

    Types function part of an application

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

    Types a pattern with prototype pt

    Types a pattern with prototype pt

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

    Definition Classes
    Typer
  106. def typedQualifier(tree: Tree): Tree

    Definition Classes
    Typer
  107. def typedQualifier(tree: Tree, mode: Int): 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
  108. def typedQualifier(tree: Tree, mode: Int, pt: Type): 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
  109. def typedRefinement(stats: List[Tree]): Unit

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

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

    templ

    ...

    parents1

    ...

    - Check that inner classes do not inherit from Annotation

    returns

    ...

    Definition Classes
    Typer
  112. def typedType(tree: Tree): Tree

    Types a (fully parameterized) type tree

    Types a (fully parameterized) type tree

    Definition Classes
    Typer
  113. def typedType(tree: Tree, mode: Int): Tree

    Types a (fully parameterized) type tree

    Types a (fully parameterized) type tree

    Definition Classes
    Typer
  114. def typedTypeApply(tree: Tree, mode: Int, fun: Tree, args: List[Tree]): Tree

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

    Definition Classes
    Typer
  116. def typedTypeConstructor(tree: Tree, mode: Int): 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
  117. def typedTypeDef(tdef: TypeDef): TypeDef

    Definition Classes
    Typer
  118. def typedUseCase(useCase: UseCase): Unit

    Definition Classes
    Typer
  119. def typedValDef(vdef: ValDef): ValDef

    vdef

    ...

    returns

    ...

    Definition Classes
    Typer
  120. def typerAddSyntheticMethods(templ: Template, clazz: Symbol, context: Context): 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.

    Attributes
    protected
    Definition Classes
    Typer
  121. def validateParentClasses(parents: List[Tree], selfType: 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
  122. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  125. final val xtypes: Boolean(false)

    Definition Classes
    Typer

Inherited from Typer

Inherited from TyperDiagnostics

Inherited from AnyRef

Inherited from Any