dotty.tools.dotc.core.Contexts

Context

Related Docs: object Context | package Contexts

abstract class Context extends Periods with Substituters with TypeOps with Phases with Printers with Symbols with SymDenotations with Reporting with NamerContextOps with Cloneable

A context is passed basically everywhere in dotc. This is convenient but carries the risk of captured contexts in objects that turn into space leaks. To combat this risk, here are some conventions to follow:

Self Type
Context
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Context
  2. Cloneable
  3. Cloneable
  4. NamerContextOps
  5. Reporting
  6. SymDenotations
  7. Symbols
  8. Printers
  9. Phases
  10. TypeOps
  11. Substituters
  12. Periods
  13. DotClass
  14. AnyRef
  15. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Context()

Type Members

  1. class AsSeenFromMap extends TypeMap

    The TypeMap handling the asSeenFrom in more complicated cases

    The TypeMap handling the asSeenFrom in more complicated cases

    Definition Classes
    TypeOps
  2. type BoundsViolation = (ast.tpd.Tree, String, Type)

    An argument bounds violation is a triple consisting of

    An argument bounds violation is a triple consisting of

    • the argument tree
    • a string "upper" or "lower" indicating which bound is violated
    • the violated bound
    Definition Classes
    TypeOps
  3. final class SafeSubstMap extends TypeMap

    A map for "cycle safe substitutions" which do not force the denotation of a TypeRef unless the name matches up with one of the substituted symbols.

    A map for "cycle safe substitutions" which do not force the denotation of a TypeRef unless the name matches up with one of the substituted symbols.

    Definition Classes
    Substituters
  4. class SimplifyMap extends TypeMap

    Definition Classes
    TypeOps
  5. final class Subst1Map extends DeepTypeMap

    Definition Classes
    Substituters
  6. final class Subst2Map extends DeepTypeMap

    Definition Classes
    Substituters
  7. final class SubstBindingMap extends DeepTypeMap

    Definition Classes
    Substituters
  8. final class SubstDealiasMap extends DeepTypeMap

    Definition Classes
    Substituters
  9. final class SubstMap extends DeepTypeMap

    Definition Classes
    Substituters
  10. final class SubstParamMap extends DeepTypeMap

    Definition Classes
    Substituters
  11. final class SubstParamsMap extends DeepTypeMap

    Definition Classes
    Substituters
  12. final class SubstRecThisMap extends DeepTypeMap

    Definition Classes
    Substituters
  13. final class SubstSymMap extends DeepTypeMap

    Definition Classes
    Substituters
  14. final class SubstThisMap extends DeepTypeMap

    Definition Classes
    Substituters

Abstract Value Members

  1. abstract val base: ContextBase

    The context base at the root

Concrete Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. def SymDenotation(symbol: Symbol, owner: Symbol, name: Name, initFlags: FlagSet, initInfo: Type, initPrivateWithin: Symbol = NoSymbol)(implicit ctx: Context): SymDenotation

    Factory method for SymDenotion creation.

    Factory method for SymDenotion creation. All creations should be done via this method.

    Definition Classes
    SymDenotations
  5. def adjustModuleCompleter(completer: LazyType, name: Name): LazyType

    Add moduleClass or sourceModule functionality to completer for a module or module class

    Add moduleClass or sourceModule functionality to completer for a module or module class

    Definition Classes
    NamerContextOps
  6. def approximateUnion(tp: Type): Type

    Approximate union type by intersection of its dominators.

    Approximate union type by intersection of its dominators. See Type#approximateUnion for an explanation.

    Definition Classes
    TypeOps
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. final def asSeenFrom(tp: Type, pre: Type, cls: Symbol): Type

    The type tp as seen from prefix pre and owner cls.

    The type tp as seen from prefix pre and owner cls. See the spec for what this means. Called very often, so the code is optimized heavily.

    A tricky aspect is what to do with unstable prefixes. E.g. say we have a class

    class C { type T; def f(x: T): T }

    and an expression e of type C. Then computing the type of e.f leads to the query asSeenFrom(C, (x: T)T). What should its result be? The naive answer (x: C#T)C#T is incorrect given that we treat C#T as the existential exists(c: C)c.T. What we need to do instead is to skolemize the existential. So the answer would be (x: c.T)c.T for some (unknown) value c of type C. c.T is expressed in the compiler as a skolem type Skolem(C).

    Now, skolemization is messy and expensive, so we want to do it only if we absolutely must. Also, skolemizing immediately would mean that asSeenFrom was no longer idempotent - each call would return a type with a different skolem. Instead we produce an annotated type that marks the prefix as unsafe:

    (x: (C @ UnsafeNonvariant)#T)C#T

    We also set a global state flag unsafeNonvariant to the current run. When typing a Select node, typer will check that flag, and if it points to the current run will scan the result type of the select for

    Definition Classes
    TypeOps
  9. def atNextPhase[T](op: (Context) ⇒ T): T

    Definition Classes
    Phases
  10. def atPeriod[T](pd: Period)(op: (Context) ⇒ T): T

    Execute op at given period

    Execute op at given period

    Definition Classes
    Periods
  11. def atPhase[T](phase: Phase)(op: (Context) ⇒ T): T

    Execute op at given phase

    Execute op at given phase

    Definition Classes
    Phases
  12. def atPhase[T](pid: PhaseId)(op: (Context) ⇒ T): T

    Execute op at given phase id

    Execute op at given phase id

    Definition Classes
    Periods
  13. def atPhaseNotLaterThan[T](limit: Phase)(op: (Context) ⇒ T): T

    Definition Classes
    Phases
  14. def atPhaseNotLaterThanTyper[T](op: (Context) ⇒ T): T

    Definition Classes
    Phases
  15. def boundsViolations(args: List[ast.tpd.Tree], boundss: List[TypeBounds], instantiate: (Type, List[Type]) ⇒ Type)(implicit ctx: Context): List[BoundsViolation]

    The list of violations where arguments are not within bounds.

    The list of violations where arguments are not within bounds.

    args

    The arguments

    boundss

    The list of type bounds

    instantiate

    A function that maps a bound type and the list of argument types to a resulting type. Needed to handle bounds that refer to other bounds.

    Definition Classes
    TypeOps
  16. def canAutoTuple: Boolean

    Is auto-tupling enabled?

    Is auto-tupling enabled?

    Definition Classes
    TypeOps
  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. val companionMethodFlags: FlagSet

    Definition Classes
    Symbols
  19. def compilationUnit: CompilationUnit

  20. def compilationUnit_=(compilationUnit: CompilationUnit): Unit

    Attributes
    protected
  21. def compilerCallback: CompilerCallback

  22. def compilerCallback_=(callback: CompilerCallback): Unit

    Attributes
    protected
  23. def conditionalTraceIndented[T](cond: Boolean, question: ⇒ String, printer: Printer = Printers.default, show: Boolean = false)(op: ⇒ T): T

    Definition Classes
    Reporting
  24. implicit def ctx: Context

  25. def debug: Boolean

    Is the debug option set?

  26. def debugTraceIndented[T](question: ⇒ String, printer: Printer = Printers.default, show: Boolean = false)(op: ⇒ T): T

    Definition Classes
    Reporting
  27. def debuglog(msg: ⇒ String): Unit

    Definition Classes
    Reporting
  28. def debugwarn(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  29. def defContext(sym: Symbol): Context

    Context where sym is defined, assuming we are in a nested context.

    Context where sym is defined, assuming we are in a nested context.

    Definition Classes
    NamerContextOps
  30. def denotNamed(name: Name): Denotation

    The denotation with the given name in current context

    The denotation with the given name in current context

    Definition Classes
    NamerContextOps
  31. def deprecationWarning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  32. object deskolemize extends ApproximatingTypeMap

    Approximate a type tp with a type that does not contain skolem types.

    Approximate a type tp with a type that does not contain skolem types.

    Definition Classes
    TypeOps
  33. def diagnose(str: ⇒ String): Unit

    Leave message in diagnostics buffer if it exists

  34. def diagnostics: Option[StringBuilder]

  35. def diagnostics_=(diagnostics: Option[StringBuilder]): Unit

    Attributes
    protected
  36. def dynamicsEnabled: Boolean

    Definition Classes
    TypeOps
  37. def echo(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  38. def effectiveResultType(sym: Symbol, typeParams: List[Symbol], given: Type): Type

    The given type, unless sym is a constructor, in which case the type of the constructed instance is returned

    The given type, unless sym is a constructor, in which case the type of the constructed instance is returned

    Definition Classes
    NamerContextOps
  39. def effectiveScope: Scope

    Either the current scope, or, if the current context owner is a class, the declarations of the current class.

    Either the current scope, or, if the current context owner is a class, the declarations of the current class.

    Definition Classes
    NamerContextOps
  40. def enclTemplate: Context

    The next outer context whose tree is a template or package definition

  41. def enter(sym: Symbol): Symbol

    Enter symbol into current class, if current class is owner of current context, or into current scope, if not.

    Enter symbol into current class, if current class is owner of current context, or into current scope, if not. Should always be called instead of scope.enter in order to make sure that updates to class members are reflected in finger prints.

    Definition Classes
    NamerContextOps
  42. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  44. def erasedTypes: Boolean

    Does current phase use an erased types interpretation?

  45. def error(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  46. def errorOrMigrationWarning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  47. def exprContext(stat: Tree[_ >: Untyped], exprOwner: Symbol): Context

    The context of expression expr seen as a member of a statement sequence

  48. def featureEnabled(owner: ClassSymbol, feature: TermName): Boolean

    Is feature enabled in class owner? This is the case if one of the following two alternatives holds:

    Is feature enabled in class owner? This is the case if one of the following two alternatives holds:

    1. The feature is imported by a named import

    import owner.feature

    (the feature may be bunched with others, or renamed, but wildcard imports don't count).

    2. The feature is enabled by a compiler option

    • language:<prefix>feature

    where <prefix> is the full name of the owner followed by a "." minus the prefix "dotty.language.".

    Definition Classes
    TypeOps
  49. def featureWarning(feature: String, featureDescription: String, isScala2Feature: Boolean, featureUseSite: Symbol, required: Boolean, pos: SourcePosition): Unit

    Definition Classes
    Reporting
  50. def featureWarning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  51. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  52. def forwardRef(argSym: Symbol, from: Symbol, to: TypeBounds, cls: ClassSymbol, decls: Scope): Unit

    If we have member definitions

    If we have member definitions

    type argSym v= from type from v= to

    where the variances of both alias are the same, then enter a new definition

    type argSym v= to

    unless a definition for argSym already exists in the current scope.

    Definition Classes
    TypeOps
  53. def fresh: FreshContext

    A fresh clone of this context.

  54. def freshName(prefix: Name): String

  55. def freshName(prefix: String = ""): String

  56. def freshNames: FreshNameCreator

  57. def freshNames_=(freshNames: FreshNameCreator): Unit

    Attributes
    protected
  58. def gadt: GADTMap

  59. def gadt_=(gadt: GADTMap): Unit

    Attributes
    protected
  60. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  61. def getClassIfDefined(path: PreName): Symbol

    Get ClassSymbol if class is either defined in current compilation run or present on classpath.

    Get ClassSymbol if class is either defined in current compilation run or present on classpath. Returns NoSymbol otherwise.

    Definition Classes
    Symbols
  62. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  63. def implicits: ContextualImplicits

  64. def importInfo: ImportInfo

  65. def importInfo_=(importInfo: ImportInfo): Unit

    Attributes
    protected
  66. def incompleteInputError(msg: String, pos: SourcePosition = NoSourcePosition)(implicit ctx: Context): Unit

    Definition Classes
    Reporting
  67. def inform(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    For sending messages that are printed only if -verbose is set

    For sending messages that are printed only if -verbose is set

    Definition Classes
    Reporting
  68. def informProgress(msg: ⇒ String): Unit

    Definition Classes
    Reporting
  69. def informTime(msg: ⇒ String, start: Long): Unit

    Definition Classes
    Reporting
  70. def init(outer: Context): Context.this.type

    A condensed context containing essential information of this but no outer contexts except the initial context.

    A condensed context containing essential information of this but no outer contexts except the initial context. private var _condensed: CondensedContext = null def condensed: CondensedContext = { if (_condensed eq outer.condensed) _condensed = base.initialCtx.fresh .withPeriod(period) .withNewMode(mode) // typerState and its constraint is not preserved in condensed // reporter is always ThrowingReporter .withPrinterFn(printerFn) .withOwner(owner) .withSettings(sstate) // tree is not preserved in condensed .withRunInfo(runInfo) .withDiagnostics(diagnostics) .withMoreProperties(moreProperties) _condensed }

    Attributes
    protected
  71. def isAfterTyper: Boolean

    Definition Classes
    Phases
  72. def isClassDefContext: Boolean

    Is this a context for the members of a class definition?

  73. def isImportContext: Boolean

    Is this a context that introduces an import clause?

  74. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  75. def isNonEmptyScopeContext: Boolean

    Is this a context that introduces a non-empty scope?

  76. def log(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Log msg if settings.log contains the current phase.

    Log msg if settings.log contains the current phase. See config.CompilerCommand#explainAdvanced for the exact meaning of "contains" here.

    Definition Classes
    Reporting
  77. def makePackageObjPrefixExplicit(tpe: NamedType): Type

    If tpe is of the form p.x where p refers to a package but x is not owned by a package, expand it to

    If tpe is of the form p.x where p refers to a package but x is not owned by a package, expand it to

    p.package.x

    Definition Classes
    TypeOps
  78. def mapSymbols(originals: List[Symbol], ttmap: TreeTypeMap, mapAlways: Boolean = false): List[Symbol]

    Map given symbols, subjecting their attributes to the mappings defined in the given TreeTypeMap ttmap.

    Map given symbols, subjecting their attributes to the mappings defined in the given TreeTypeMap ttmap. Cross symbol references are brought over from originals to copies. Do not copy any symbols if all attributes of all symbols stay the same.

    Definition Classes
    Symbols
  79. def methodType(typeParams: List[Symbol], valueParamss: List[List[Symbol]], resultType: Type, isJava: Boolean = false)(implicit ctx: Context): Type

    The method type corresponding to given parameters and result type

    The method type corresponding to given parameters and result type

    Definition Classes
    NamerContextOps
  80. def migrationWarning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  81. def mode: Mode

  82. def mode_=(mode: Mode): Unit

    Attributes
    protected
  83. def moreProperties: Map[String, Any]

  84. def moreProperties_=(moreProperties: Map[String, Any]): Unit

    Attributes
    protected
  85. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  86. def newClassSymbol(owner: Symbol, name: TypeName, flags: FlagSet, infoFn: (ClassSymbol) ⇒ Type, privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord, assocFile: AbstractFile = null): ClassSymbol

    Create a class symbol from its non-info fields and a function producing its info (the produced info may be lazy).

    Create a class symbol from its non-info fields and a function producing its info (the produced info may be lazy).

    Definition Classes
    Symbols
  87. def newClassSymbolDenoting(denotFn: (ClassSymbol) ⇒ SymDenotation, coord: Coord = NoCoord, assocFile: AbstractFile = null): ClassSymbol

    Create a class symbol from a function producing its denotation

    Create a class symbol from a function producing its denotation

    Definition Classes
    Symbols
  88. def newCompleteClassSymbol(owner: Symbol, name: TypeName, flags: FlagSet, parents: List[TypeRef], decls: Scope = newScope, selfInfo: Type = NoType, privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord, assocFile: AbstractFile = null): ClassSymbol

    Create a class symbol from its non-info fields and the fields of its info.

    Create a class symbol from its non-info fields and the fields of its info.

    Definition Classes
    Symbols
  89. def newCompleteModuleSymbol(owner: Symbol, name: TermName, modFlags: FlagSet, clsFlags: FlagSet, parents: List[TypeRef], decls: Scope, privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord, assocFile: AbstractFile = null): TermSymbol

    Create a module symbol with associated module class from its non-info fields and the fields of the module class info.

    Create a module symbol with associated module class from its non-info fields and the fields of the module class info.

    Definition Classes
    Symbols
  90. def newCompletePackageSymbol(owner: Symbol, name: TermName, modFlags: FlagSet = EmptyFlags, clsFlags: FlagSet = EmptyFlags, decls: Scope = newScope): TermSymbol

    Create a package symbol with associated package class from its non-info fields its member scope.

    Create a package symbol with associated package class from its non-info fields its member scope.

    Definition Classes
    Symbols
  91. def newConstructor(cls: ClassSymbol, flags: FlagSet, paramNames: List[TermName], paramTypes: List[Type], privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord): Symbol { type ThisName = dotty.tools.dotc.core.Names.TermName }

    Create a class constructor symbol for given class cls.

    Create a class constructor symbol for given class cls.

    Definition Classes
    Symbols
  92. def newDefaultConstructor(cls: ClassSymbol): Symbol { type ThisName = dotty.tools.dotc.core.Names.TermName }

    Create an empty default constructor symbol for given class cls.

    Create an empty default constructor symbol for given class cls.

    Definition Classes
    Symbols
  93. def newErrorSymbol(owner: Symbol, name: Name): Symbol { type ThisName = dotty.tools.dotc.core.Names.Name }

    Definition Classes
    Symbols
  94. def newImportSymbol(owner: Symbol, expr: ast.tpd.Tree, coord: Coord = NoCoord): Symbol { type ThisName = dotty.tools.dotc.core.Names.TermName }

    Create an import symbol pointing back to given qualifier expr.

    Create an import symbol pointing back to given qualifier expr.

    Definition Classes
    Symbols
  95. def newLocalDummy(cls: Symbol, coord: Coord = NoCoord): Symbol { type ThisName = dotty.tools.dotc.core.Names.TermName }

    Create the local template dummy of given class cls.

    Create the local template dummy of given class cls. In a template

    trait T { val fld: Int; { val x: int = 2 }; val fld2 = { val y = 2; y }}

    the owner of x is the local dummy of the template. The owner of the local dummy is then the class of the template itself. By contrast, the owner of y would be fld2. There is a single local dummy per template.

    Definition Classes
    Symbols
  96. def newModuleSymbol(owner: Symbol, name: TermName, modFlags: FlagSet, clsFlags: FlagSet, infoFn: (TermSymbol, ClassSymbol) ⇒ Type, privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord, assocFile: AbstractFile = null): TermSymbol

    Create a module symbol with associated module class from its non-info fields and a function producing the info of the module class (this info may be lazy).

    Create a module symbol with associated module class from its non-info fields and a function producing the info of the module class (this info may be lazy).

    Definition Classes
    Symbols
  97. def newNakedClassSymbol(coord: Coord = NoCoord, assocFile: AbstractFile = null)(implicit ctx: Context): ClassSymbol

    Create a class symbol without a denotation.

    Create a class symbol without a denotation.

    Definition Classes
    Symbols
  98. def newNakedSymbol[N <: Name](coord: Coord = NoCoord)(implicit ctx: Context): Symbol { type ThisName = N }

    Create a symbol without a denotation.

    Create a symbol without a denotation. Note this uses a cast instead of a direct type refinement because it's debug-friendlier not to create an anonymous class here.

    Definition Classes
    Symbols
  99. def newNormalizedClassSymbol(owner: Symbol, name: TypeName, flags: FlagSet, parentTypes: List[Type], decls: Scope = newScope, selfInfo: Type = NoType, privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord, assocFile: AbstractFile = null): ClassSymbol

    Same as newCompleteClassSymbol except that parents can be a list of arbitrary types which get normalized into type refs and parameter bindings.

    Same as newCompleteClassSymbol except that parents can be a list of arbitrary types which get normalized into type refs and parameter bindings.

    Definition Classes
    Symbols
  100. def newPackageSymbol(owner: Symbol, name: TermName, infoFn: (TermSymbol, ClassSymbol) ⇒ LazyType): TermSymbol

    Create a package symbol with associated package class from its non-info fields and a lazy type for loading the package's members.

    Create a package symbol with associated package class from its non-info fields and a lazy type for loading the package's members.

    Definition Classes
    Symbols
  101. def newSelfSym(cls: ClassSymbol, name: TermName = nme.WILDCARD, selfInfo: Type = NoType): TermSymbol

    Create a symbol representing a selftype declaration for class cls.

    Create a symbol representing a selftype declaration for class cls.

    Definition Classes
    Symbols
  102. def newSkolem(tp: Type): Symbol { type ThisName = dotty.tools.dotc.core.Names.TermName }

    Create a new skolem symbol.

    Create a new skolem symbol. This is not the same as SkolemType, even though the motivation (create a singleton referencing to a type) is similar.

    Definition Classes
    Symbols
  103. def newStubSymbol(owner: Symbol, name: Name, file: AbstractFile = null): Symbol

    Create a stub symbol that will issue a missing reference error when attempted to be completed.

    Create a stub symbol that will issue a missing reference error when attempted to be completed.

    Definition Classes
    Symbols
  104. def newSymbol[N <: Name](owner: Symbol, name: N, flags: FlagSet, info: Type, privateWithin: Symbol = NoSymbol, coord: Coord = NoCoord): Symbol { type ThisName = N }

    Create a symbol from its fields (info may be lazy)

    Create a symbol from its fields (info may be lazy)

    Definition Classes
    Symbols
  105. def newTypeParams(owner: Symbol, names: List[TypeName], flags: FlagSet, boundsFn: (List[TypeRef]) ⇒ List[Type]): List[TypeSymbol]

    Create new type parameters with given owner, names, and flags.

    Create new type parameters with given owner, names, and flags.

    boundsFn

    A function that, given type refs to the newly created parameters returns a list of their bounds.

    Definition Classes
    Symbols
  106. def normalizeIfConstructor(paramSymss: List[List[Symbol]], isConstructor: Boolean): List[List[Symbol]]

    if isConstructor, make sure it has one non-implicit parameter list

    if isConstructor, make sure it has one non-implicit parameter list

    Definition Classes
    NamerContextOps
  107. def normalizeToClassRefs(parents: List[Type], cls: ClassSymbol, decls: Scope): List[TypeRef]

    Normalize a list of parent types of class cls that may contain refinements to a list of typerefs referring to classes, by converting all refinements to member definitions in scope decls.

    Normalize a list of parent types of class cls that may contain refinements to a list of typerefs referring to classes, by converting all refinements to member definitions in scope decls. Can add members to decls as a side-effect.

    Definition Classes
    TypeOps
  108. final def notify(): Unit

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

    Definition Classes
    AnyRef
  110. def outer: Context

  111. def outer_=(outer: Context): Unit

    Attributes
    protected
  112. def outersIterator: Iterator[Context] { ... /* 2 definitions in type refinement */ }

    All outer contexts, ending in base.initialCtx and then NoContext

  113. def owner: Symbol

  114. def owner_=(owner: Symbol): Unit

    Attributes
    protected
  115. def period: Period

  116. def period_=(period: Period): Unit

    Attributes
    protected
  117. def phase: Phase

    Definition Classes
    Phases
  118. def phaseId: Int

    The current phase identifier

    The current phase identifier

    Definition Classes
    Periods
  119. def phasesStack: List[Phase]

    Definition Classes
    Phases
  120. def printCreationTraces(): Unit

    Print all enclosing context's creation stacktraces

  121. def printer: Printer

    A function creating a printer

    A function creating a printer

    Definition Classes
    Printers
  122. def printerFn: (Context) ⇒ Printer

  123. def printerFn_=(printerFn: (Context) ⇒ Printer): Unit

    Attributes
    protected
  124. def reporter: Reporter

    The current reporter

  125. def requiredClass(path: PreName): ClassSymbol

    Definition Classes
    Symbols
  126. def requiredClassRef(path: PreName): TypeRef

    Definition Classes
    Symbols
  127. def requiredModule(path: PreName): TermSymbol

    Definition Classes
    Symbols
  128. def requiredModuleRef(path: PreName): TermRef

    Definition Classes
    Symbols
  129. def requiredPackage(path: PreName): TermSymbol

    Definition Classes
    Symbols
  130. def requiredPackageRef(path: PreName): TermRef

    Definition Classes
    Symbols
  131. def restrictionError(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  132. def runId: Int

    The current run identifier

    The current run identifier

    Definition Classes
    Periods
  133. def runInfo: RunInfo

  134. def runInfo_=(runInfo: RunInfo): Unit

    Attributes
    protected
  135. def sbtCallback: AnalysisCallback

  136. def sbtCallback_=(callback: AnalysisCallback): Unit

    Attributes
    protected
  137. def scala2Mode: Boolean

    Definition Classes
    TypeOps
  138. def scope: Scope

  139. def scope_=(scope: Scope): Unit

    Attributes
    protected
  140. def searchHistory: SearchHistory

  141. def searchHistory_=(searchHistory: SearchHistory): Unit

    Attributes
    protected
  142. final def simplify(tp: Type, theMap: SimplifyMap): Type

    Implementation of Types#simplified

    Implementation of Types#simplified

    Definition Classes
    TypeOps
  143. def source: SourceFile

    The current source file; will be derived from current compilation unit.

  144. def sstate: SettingsState

  145. def sstate_=(sstate: SettingsState): Unit

    Attributes
    protected
  146. def stablePeriod: Period

    The period containing the current period where denotations do not change.

    The period containing the current period where denotations do not change. We compute this by taking as first phase the first phase less or equal to the current phase that has the same "nextTransformerId". As last phase we take the next transformer id following the current phase.

    Definition Classes
    Periods
  147. def stillValid(denot: SymDenotation): Boolean

    Definition Classes
    SymDenotations
  148. def strictWarning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  149. final def subst(tp: Type, from: List[Symbol], to: List[Type], theMap: SubstMap): Type

    Definition Classes
    Substituters
  150. final def subst(tp: Type, from: BindingType, to: BindingType, theMap: SubstBindingMap): Type

    Definition Classes
    Substituters
  151. final def subst1(tp: Type, from: Symbol, to: Type, theMap: Subst1Map): Type

    Definition Classes
    Substituters
  152. final def subst2(tp: Type, from1: Symbol, to1: Type, from2: Symbol, to2: Type, theMap: Subst2Map): Type

    Definition Classes
    Substituters
  153. final def substDealias(tp: Type, from: List[Symbol], to: List[Type], theMap: SubstDealiasMap): Type

    Definition Classes
    Substituters
  154. final def substParam(tp: Type, from: ParamType, to: Type, theMap: SubstParamMap): Type

    Definition Classes
    Substituters
  155. final def substParams(tp: Type, from: BindingType, to: List[Type], theMap: SubstParamsMap): Type

    Definition Classes
    Substituters
  156. final def substRecThis(tp: Type, from: Type, to: Type, theMap: SubstRecThisMap): Type

    Definition Classes
    Substituters
  157. final def substSym(tp: Type, from: List[Symbol], to: List[Symbol], theMap: SubstSymMap): Type

    Definition Classes
    Substituters
  158. final def substThis(tp: Type, from: ClassSymbol, to: Type, theMap: SubstThisMap): Type

    Definition Classes
    Substituters
  159. def superCallContext: Context

    The context for a supercall.

    The context for a supercall. This context is used for elaborating the parents of a class and their arguments. The context is computed from the current class context. It has

    • as owner: The primary constructor of the class
    • as outer context: The context enclosing the class context
    • as scope: The parameter accessors in the class context
    • with additional mode: InSuperCall

    The reasons for this peculiar choice of attributes are as follows:

    • The constructor must be the owner, because that's where any local methods or closures should go.
    • The context may not see any class members (inherited or defined), and should instead see definitions defined in the outer context which might be shadowed by such class members. That's why the outer context must be the outer context of the class.
    • At the same time the context should see the parameter accessors of the current class, that's why they get added to the local scope. An alternative would have been to have the context see the constructor parameters instead, but then we'd need a final substitution step from constructor parameters to class parameter accessors.
  160. def symOfContextTree(tree: ast.untpd.Tree): Symbol

    The symbol (stored in some typer's symTree) of an enclosing context definition

    The symbol (stored in some typer's symTree) of an enclosing context definition

    Definition Classes
    NamerContextOps
  161. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  162. def synthesizeCompanionMethod(name: Name, target: SymDenotation, owner: SymDenotation)(implicit ctx: Context): Symbol

    Definition Classes
    Symbols
  163. def testScala2Mode(msg: String, pos: Position): Boolean

    Definition Classes
    TypeOps
  164. def thisCallArgContext: Context

    The context for the arguments of a this(...) constructor call.

    The context for the arguments of a this(...) constructor call. The context is computed from the local auxiliary constructor context. It has

    • as owner: The auxiliary constructor
    • as outer context: The context enclosing the enclosing class context
    • as scope: The parameters of the auxiliary constructor.
  165. def toString(): String

    Definition Classes
    Context → AnyRef → Any
  166. def trace[T](msg: ⇒ String)(value: T): T

    Definition Classes
    Reporting
  167. def traceIndented[T](leading: ⇒ String, trailing: (Any) ⇒ String)(op: ⇒ T): T

    Definition Classes
    Reporting
  168. def traceIndented[T](question: ⇒ String, printer: Printer = Printers.default, show: Boolean = false)(op: ⇒ T): T

    Definition Classes
    Reporting
  169. def traceInvalid(denot: Denotation): Boolean

    Explain why symbol is invalid; used for debugging only

    Explain why symbol is invalid; used for debugging only

    Definition Classes
    SymDenotations
  170. def tree: Tree[_ >: Untyped]

  171. def tree_=(tree: Tree[_ >: Untyped]): Unit

    Attributes
    protected
  172. def typeAssigner: TypeAssigner

  173. def typeAssigner_=(typeAssigner: TypeAssigner): Unit

    Attributes
    protected
  174. def typeComparer: TypeComparer

  175. def typeComparer_=(typeComparer: TypeComparer): Unit

    Attributes
    protected
  176. def typer: Typer

  177. def typerState: TyperState

  178. def typerState_=(typerState: TyperState): Unit

    Attributes
    protected
  179. def uncheckedWarning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  180. def unsupported(methodName: String): Nothing

    Throws an UnsupportedOperationException with the given method name.

    Throws an UnsupportedOperationException with the given method name.

    Definition Classes
    DotClass
  181. def useColors: Boolean

    Should use colors when printing?

  182. def verbose: Boolean

    Is the verbose option set?

  183. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  186. def warning(msg: ⇒ String, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  187. final def withOwner(owner: Symbol): Context

  188. final def withPhase(phase: Phase): Context

  189. final def withPhase(phaseId: PhaseId): Context

    This context at given phase.

    This context at given phase. This method will always return a phase period equal to phaseId, thus will never return squashed phases

  190. final def withPhaseNoLater(phase: Phase): Context

Inherited from Cloneable

Inherited from Cloneable

Inherited from NamerContextOps

Inherited from Reporting

Inherited from SymDenotations

Inherited from Symbols

Inherited from Printers

Inherited from Phases

Inherited from TypeOps

Inherited from Substituters

Inherited from Periods

Inherited from DotClass

Inherited from AnyRef

Inherited from Any

Ungrouped