@@ -862,7 +862,7 @@ object SymDenotations {
862862 def membersNeedAsSeenFrom (pre : Type )(using Context ): Boolean =
863863 ! ( this .isTerm
864864 || this .isStaticOwner && ! this .seesOpaques
865- || currentlyAfterErasure
865+ || ctx.erasedTypes
866866 || (pre eq NoPrefix )
867867 || (pre eq thisType)
868868 )
@@ -875,7 +875,7 @@ object SymDenotations {
875875 * Default parameters are recognized until erasure.
876876 */
877877 def hasDefaultParams (using Context ): Boolean =
878- if currentlyAfterErasure then false
878+ if ctx.erasedTypes then false
879879 else if is(HasDefaultParams ) then true
880880 else if is(NoDefaultParams ) then false
881881 else
@@ -1450,7 +1450,7 @@ object SymDenotations {
14501450 // simulate default parameters, while also passing implicit context ctx to the default values
14511451 val initFlags1 = (if (initFlags != UndefinedFlags ) initFlags else this .flags)
14521452 val info1 = if (info != null ) info else this .info
1453- if (currentlyAfterTyper && changedClassParents(info, info1, completersMatter = false ))
1453+ if (ctx.isAfterTyper && changedClassParents(info, info1, completersMatter = false ))
14541454 assert(ctx.phase.changesParents, i " undeclared parent change at ${ctx.phase} for $this, was: $info, now: $info1" )
14551455 val privateWithin1 = if (privateWithin != null ) privateWithin else this .privateWithin
14561456 val annotations1 = if (annotations != null ) annotations else this .annotations
@@ -1567,17 +1567,17 @@ object SymDenotations {
15671567 private var memberNamesCache : MemberNames = MemberNames .None
15681568
15691569 private def memberCache (using Context ): LRUCache [Name , PreDenotation ] = {
1570- if (myMemberCachePeriod != currentPeriod ) {
1570+ if (myMemberCachePeriod != ctx.period ) {
15711571 myMemberCache = new LRUCache
1572- myMemberCachePeriod = currentPeriod
1572+ myMemberCachePeriod = ctx.period
15731573 }
15741574 myMemberCache
15751575 }
15761576
15771577 private def baseTypeCache (using Context ): BaseTypeMap = {
15781578 if ! currentHasSameBaseTypesAs(myBaseTypeCachePeriod) then
15791579 myBaseTypeCache = new BaseTypeMap
1580- myBaseTypeCachePeriod = currentPeriod
1580+ myBaseTypeCachePeriod = ctx.period
15811581 myBaseTypeCache
15821582 }
15831583
@@ -1641,7 +1641,7 @@ object SymDenotations {
16411641 override final def typeParams (using Context ): List [TypeSymbol ] = {
16421642 if (myTypeParams == null )
16431643 myTypeParams =
1644- if (currentlyAfterErasure || is(Module )) Nil // fast return for modules to avoid scanning package decls
1644+ if (ctx.erasedTypes || is(Module )) Nil // fast return for modules to avoid scanning package decls
16451645 else {
16461646 val di = initial
16471647 if (this ne di) di.typeParams
@@ -1729,7 +1729,7 @@ object SymDenotations {
17291729
17301730 def computeBaseData (implicit onBehalf : BaseData , ctx : Context ): (List [ClassSymbol ], BaseClassSet ) = {
17311731 def emptyParentsExpected =
1732- is(Package ) || (symbol == defn.AnyClass ) || currentlyAfterErasure && (symbol == defn.ObjectClass )
1732+ is(Package ) || (symbol == defn.AnyClass ) || ctx.erasedTypes && (symbol == defn.ObjectClass )
17331733 if (classParents.isEmpty && ! emptyParentsExpected)
17341734 onBehalf.signalProvisional()
17351735 val builder = new BaseDataBuilder
@@ -1825,7 +1825,7 @@ object SymDenotations {
18251825 */
18261826 def ensureTypeParamsInCorrectOrder ()(using Context ): Unit = {
18271827 val tparams = typeParams
1828- if (! currentlyAfterErasure && ! typeParamsFromDecls.corresponds(tparams)(_.name == _.name)) {
1828+ if (! ctx.erasedTypes && ! typeParamsFromDecls.corresponds(tparams)(_.name == _.name)) {
18291829 val decls = info.decls
18301830 val decls1 = newScope
18311831 for (tparam <- typeParams) decls1.enter(decls.lookup(tparam.name))
@@ -2372,7 +2372,7 @@ object SymDenotations {
23722372 def traceInvalid (denot : Denotation )(using Context ): Boolean = {
23732373 def show (d : Denotation ) = s " $d# ${d.symbol.id}"
23742374 def explain (msg : String ) = {
2375- println(s " ${show(denot)} is invalid at ${currentPeriod } because $msg" )
2375+ println(s " ${show(denot)} is invalid at ${ctx.period } because $msg" )
23762376 false
23772377 }
23782378 denot match {
@@ -2535,7 +2535,7 @@ object SymDenotations {
25352535 implicit val None : MemberNames = new InvalidCache with MemberNames {
25362536 def apply (keepOnly : NameFilter , clsd : ClassDenotation )(implicit onBehalf : MemberNames , ctx : Context ) = ???
25372537 }
2538- def newCache ()(using Context ): MemberNames = new MemberNamesImpl (currentPeriod )
2538+ def newCache ()(using Context ): MemberNames = new MemberNamesImpl (ctx.period )
25392539 }
25402540
25412541 /** A cache for baseclasses, as a sequence in linearization order and as a set that
@@ -2552,7 +2552,7 @@ object SymDenotations {
25522552 def apply (clsd : ClassDenotation )(implicit onBehalf : BaseData , ctx : Context ) = ???
25532553 def signalProvisional () = ()
25542554 }
2555- def newCache ()(using Context ): BaseData = new BaseDataImpl (currentPeriod )
2555+ def newCache ()(using Context ): BaseData = new BaseDataImpl (ctx.period )
25562556 }
25572557
25582558 private abstract class InheritedCacheImpl (val createdAt : Period ) extends InheritedCache {
@@ -2575,11 +2575,11 @@ object SymDenotations {
25752575 }
25762576
25772577 def isValidAt (phase : Phase )(using Context ) =
2578- checkedPeriod == currentPeriod ||
2578+ checkedPeriod == ctx.period ||
25792579 createdAt.runId == ctx.runId &&
25802580 createdAt.phaseId < unfusedPhases.length &&
25812581 sameGroup(unfusedPhases(createdAt.phaseId), phase) &&
2582- { checkedPeriod = currentPeriod ; true }
2582+ { checkedPeriod = ctx.period ; true }
25832583 }
25842584
25852585 private class InvalidCache extends InheritedCache {
0 commit comments