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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. 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
  8. def atNextPhase[T](op: (Context) ⇒ T): T

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

    Execute op at given period

    Execute op at given period

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

    Execute op at given phase

    Execute op at given phase

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

    Execute op at given phase id

    Execute op at given phase id

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

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

    Definition Classes
    Phases
  14. 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
  15. def canAutoTuple: Boolean

    Is auto-tupling enabled?

    Is auto-tupling enabled?

    Definition Classes
    TypeOps
  16. def clone(): AnyRef

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

    Definition Classes
    Symbols
  18. def compilationUnit: CompilationUnit

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

    Attributes
    protected
  20. def compilerCallback: CompilerCallback

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

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

    Definition Classes
    Reporting
    Annotations
    @inline()
  23. implicit def ctx: Context

  24. def debug: Boolean

    Is the debug option set?

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

    Definition Classes
    Reporting
    Annotations
    @inline()
  26. def debuglog(msg: ⇒ String): Unit

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

    Definition Classes
    Reporting
  28. 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
  29. 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
  30. def deprecationWarning(msg: ⇒ Message, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  31. 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
  32. def diagnose(str: ⇒ String): Unit

    Leave message in diagnostics buffer if it exists

  33. def diagnostics: Option[StringBuilder]

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

    Attributes
    protected
  35. def doTraceIndented[T](leading: ⇒ String, trailing: (Any) ⇒ String)(op: ⇒ T): T

    Definition Classes
    Reporting
  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: ⇒ Message, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  46. def errorOrMigrationWarning(msg: ⇒ Message, 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: ⇒ Message, 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 harmonizeUnion(tp: Type): Type

    Given a disjunction T1 | ...

    Given a disjunction T1 | ... | Tn of types with potentially embedded type variables, constrain type variables further if this eliminates some of the branches of the disjunction. Do this also for disjunctions embedded in intersections, as parents in refinements, and in recursive types.

    For instance, if A is an unconstrained type variable, then

    ArrayBuffer[Int] | ArrayBuffer[A]

    is approximated by constraining A to be =:= to Int and returning ArrayBuffer[Int] instead of ArrayBuffer[_ >: Int | A <: Int & A]

    Definition Classes
    TypeOps
  63. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  64. def implicits: ContextualImplicits

  65. def importInfo: ImportInfo

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

    Attributes
    protected
  67. def incompleteInputError(msg: ⇒ Message, pos: SourcePosition = NoSourcePosition)(implicit ctx: Context): Unit

    Definition Classes
    Reporting
  68. 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
  69. def informProgress(msg: ⇒ String): Unit

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

    Definition Classes
    Reporting
  71. 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
  72. def isAfterTyper: Boolean

    Definition Classes
    Phases
  73. def isClassDefContext: Boolean

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

  74. def isImportContext: Boolean

    Is this a context that introduces an import clause?

  75. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  76. def isNonEmptyScopeContext: Boolean

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

  77. 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
  78. 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
  79. 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
  80. 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
  81. def migrationWarning(msg: ⇒ Message, pos: SourcePosition = NoSourcePosition): Unit

    Definition Classes
    Reporting
  82. def mode: Mode

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

    Attributes
    protected
  84. def moreProperties: Map[Key[Any], Any]

  85. def moreProperties_=(moreProperties: Map[Key[Any], Any]): Unit

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

    Definition Classes
    AnyRef
  87. 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
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. def newErrorSymbol(owner: Symbol, name: Name): Symbol { type ThisName = dotty.tools.dotc.core.Names.Name }

    Definition Classes
    Symbols
  95. 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
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. final def notify(): Unit

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

    Definition Classes
    AnyRef
  111. def orDominator(tp: Type): Type

    Approximate union type by intersection of its dominators.

    Approximate union type by intersection of its dominators. That is, replace a union type Tn | ... | Tn by the smallest intersection type of base-class instances of T1,...,Tn. Example: Given

    trait C[+T] trait D class A extends C[A] with D class B extends C[B] with D with E

    we approximate A | B by C[A | B] with D

    Definition Classes
    TypeOps
  112. def outer: Context

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

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

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

  115. def owner: Symbol

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

    Attributes
    protected
  117. def period: Period

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

    Attributes
    protected
  119. def phase: Phase

    Definition Classes
    Phases
  120. def phaseId: Int

    The current phase identifier

    The current phase identifier

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

    Definition Classes
    Phases
  122. def printCreationTraces(): Unit

    Print all enclosing context's creation stacktraces

  123. def printer: Printer

    A function creating a printer

    A function creating a printer

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

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

    Attributes
    protected
  126. def property[T](key: Key[T]): Option[T]

  127. def reporter: Reporter

    The current reporter

  128. def requiredClass(path: PreName): ClassSymbol

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

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

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

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

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

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

    Definition Classes
    Reporting
  135. def runId: Int

    The current run identifier

    The current run identifier

    Definition Classes
    Periods
  136. def runInfo: RunInfo

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

    Attributes
    protected
  138. def sbtCallback: AnalysisCallback

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

    Attributes
    protected
  140. def scala2Mode: Boolean

    Definition Classes
    TypeOps
  141. def scope: Scope

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

    Attributes
    protected
  143. def searchHistory: SearchHistory

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

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

    Implementation of Types#simplified

    Implementation of Types#simplified

    Definition Classes
    TypeOps
  146. def source: SourceFile

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

  147. def sstate: SettingsState

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

    Attributes
    protected
  149. 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
  150. def stillValid(denot: SymDenotation): Boolean

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    Substituters
  162. 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.
  163. 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
  164. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

    Definition Classes
    TypeOps
  167. 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.
  168. def toString(): String

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

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

    Definition Classes
    Reporting
    Annotations
    @inline()
  171. 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
  172. def tree: Tree[_ >: Untyped]

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

    Attributes
    protected
  174. def typeAssigner: TypeAssigner

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

    Attributes
    protected
  176. def typeComparer: TypeComparer

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

    Attributes
    protected
  178. def typer: Typer

  179. def typerState: TyperState

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

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

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

    Throws an UnsupportedOperationException with the given method name.

    Throws an UnsupportedOperationException with the given method name.

    Definition Classes
    DotClass
  183. def useColors: Boolean

    Should use colors when printing?

  184. def verbose: Boolean

    Is the verbose option set?

  185. final def wait(): Unit

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

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

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

    Definition Classes
    Reporting
  189. def withNoError[A, B >: A](op: ⇒ A)(f: (A) ⇒ B): B

    Implements a fold that applies the function f to the result of op if there are no new errors in the reporter

    Implements a fold that applies the function f to the result of op if there are no new errors in the reporter

    op

    operation checked for errors

    f

    function applied to result of op

    returns

    either the result of op if it had errors or the result of f applied to it

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

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

  192. 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

  193. 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