@@ -9,6 +9,7 @@ import scala.collection.generic.Clearable
9
9
10
10
import dotty .tools .dotc .core .Flags ._
11
11
import dotty .tools .dotc .core .Contexts .{inContext , atPhase }
12
+ import dotty .tools .dotc .core .Phases ._
12
13
import dotty .tools .dotc .core .Symbols ._
13
14
import dotty .tools .dotc .core .Phases .Phase
14
15
import dotty .tools .dotc .transform .SymUtils ._
@@ -203,12 +204,12 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
203
204
/** For currently compiled classes: All locally defined classes including local classes.
204
205
* The empty list for classes that are not currently compiled.
205
206
*/
206
- private def getNestedClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, ctx. flattenPhase)
207
+ private def getNestedClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, flattenPhase)
207
208
208
209
/** For currently compiled classes: All classes that are declared as members of this class
209
210
* (but not inherited ones). The empty list for classes that are not currently compiled.
210
211
*/
211
- private def getMemberClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, ctx. lambdaLiftPhase)
212
+ private def getMemberClasses (sym : Symbol ): List [Symbol ] = definedClasses(sym, lambdaLiftPhase)
212
213
213
214
private def definedClasses (sym : Symbol , phase : Phase ) =
214
215
if (sym.isDefinedInCurrentRun)
@@ -229,11 +230,11 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
229
230
// After lambdalift (which is where we are), the rawowoner field contains the enclosing class.
230
231
val enclosingClassSym = {
231
232
if (innerClassSym.isClass) {
232
- atPhase(ctx. flattenPhase.prev) {
233
+ atPhase(flattenPhase.prev) {
233
234
toDenot(innerClassSym).owner.enclosingClass
234
235
}
235
236
}
236
- else innerClassSym.enclosingClass( using ctx.withPhase(ctx. flattenPhase.prev))
237
+ else atPhase( flattenPhase.prev)(innerClassSym.enclosingClass )
237
238
} // todo is handled specially for JavaDefined symbols in scalac
238
239
239
240
val enclosingClass : ClassBType = classBTypeFromSymbol(enclosingClassSym)
@@ -257,7 +258,7 @@ class BTypesFromSymbols[I <: DottyBackendInterface](val int: I) extends BTypes {
257
258
if (innerClassSym.isAnonymousClass || innerClassSym.isAnonymousFunction) None
258
259
else {
259
260
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
261
262
}
262
263
}
263
264
0 commit comments