@@ -9,6 +9,7 @@ import scala.collection.generic.Clearable
99
1010import dotty .tools .dotc .core .Flags ._
1111import dotty .tools .dotc .core .Contexts .{inContext , atPhase }
12+ import dotty .tools .dotc .core .Phases ._
1213import dotty .tools .dotc .core .Symbols ._
1314import dotty .tools .dotc .core .Phases .Phase
1415import dotty .tools .dotc .transform .SymUtils ._
@@ -203,12 +204,12 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
203204 /** For currently compiled classes: All locally defined classes including local classes.
204205 * The empty list for classes that are not currently compiled.
205206 */
206- private def getNestedClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, ctx. flattenPhase)
207+ private def getNestedClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, flattenPhase)
207208
208209 /** For currently compiled classes: All classes that are declared as members of this class
209210 * (but not inherited ones). The empty list for classes that are not currently compiled.
210211 */
211- private def getMemberClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, ctx. lambdaLiftPhase)
212+ private def getMemberClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, lambdaLiftPhase)
212213
213214 private def definedClasses (sym : Symbol , phase : Phase ) =
214215 if (sym.isDefinedInCurrentRun)
@@ -229,11 +230,11 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
229230 // After lambdalift (which is where we are), the rawowoner field contains the enclosing class.
230231 val enclosingClassSym = {
231232 if (innerClassSym.isClass) {
232- atPhase(ctx. flattenPhase.prev) {
233+ atPhase(flattenPhase.prev) {
233234 toDenot(innerClassSym).owner.enclosingClass
234235 }
235236 }
236- else innerClassSym.enclosingClass( using ctx.withPhase(ctx. flattenPhase.prev))
237+ else atPhase( flattenPhase.prev)(innerClassSym.enclosingClass )
237238 } // todo is handled specially for JavaDefined symbols in scalac
238239
239240 val enclosingClass : ClassBType = classBTypeFromSymbol(enclosingClassSym)
@@ -257,7 +258,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
257258 if (innerClassSym.isAnonymousClass || innerClassSym.isAnonymousFunction) None
258259 else {
259260 val original = innerClassSym.initial
260- Some (innerClassSym.name( using ctx.withPhase( original.validFor.phaseId)).mangledString) // moduleSuffix for module classes
261+ Some (atPhase( original.validFor.phaseId)(innerClassSym.name ).mangledString) // moduleSuffix for module classes
261262 }
262263 }
263264
0 commit comments