@@ -1209,7 +1209,7 @@ object Types {
1209
1209
case Atoms .Unknown => Atoms .Unknown
1210
1210
case _ => Atoms .Unknown
1211
1211
1212
- private def dealias1 (keep : AnnotatedType => Context => Boolean )(using Context ): Type = this match {
1212
+ private def dealias1 (keep : AnnotatedType => Context ? => Boolean )(using Context ): Type = this match {
1213
1213
case tp : TypeRef =>
1214
1214
if (tp.symbol.isClass) tp
1215
1215
else tp.info match {
@@ -1225,7 +1225,7 @@ object Types {
1225
1225
if (tp1.exists) tp1.dealias1(keep) else tp
1226
1226
case tp : AnnotatedType =>
1227
1227
val tp1 = tp.parent.dealias1(keep)
1228
- if ( keep(tp)(ctx)) tp.derivedAnnotatedType(tp1, tp.annot) else tp1
1228
+ if keep(tp) then tp.derivedAnnotatedType(tp1, tp.annot) else tp1
1229
1229
case tp : LazyRef =>
1230
1230
tp.ref.dealias1(keep)
1231
1231
case _ => this
@@ -1260,7 +1260,7 @@ object Types {
1260
1260
*/
1261
1261
def tryNormalize (using Context ): Type = NoType
1262
1262
1263
- private def widenDealias1 (keep : AnnotatedType => Context => Boolean )(using Context ): Type = {
1263
+ private def widenDealias1 (keep : AnnotatedType => Context ? => Boolean )(using Context ): Type = {
1264
1264
val res = this .widen.dealias1(keep)
1265
1265
if (res eq this ) res else res.widenDealias1(keep)
1266
1266
}
@@ -2627,7 +2627,7 @@ object Types {
2627
2627
}
2628
2628
}
2629
2629
2630
- case class LazyRef (private var refFn : Context => Type , reportCycles : Boolean = false ) extends UncachedProxyType with ValueType {
2630
+ case class LazyRef (private var refFn : Context ? => Type , reportCycles : Boolean = false ) extends UncachedProxyType with ValueType {
2631
2631
private var myRef : Type = null
2632
2632
private var computed = false
2633
2633
@@ -2640,7 +2640,7 @@ object Types {
2640
2640
throw CyclicReference (NoDenotation )
2641
2641
else
2642
2642
computed = true
2643
- val result = refFn(ctx)
2643
+ val result = refFn
2644
2644
refFn = null
2645
2645
if result != null then myRef = result
2646
2646
else assert(myRef != null ) // must have been `update`d
@@ -4431,7 +4431,7 @@ object Types {
4431
4431
else defn.AnyType // dummy type in case of errors
4432
4432
def refineSelfType (selfType : Type ) =
4433
4433
RefinedType (selfType, sym.name,
4434
- TypeAlias (LazyRef (force( using _) , reportCycles = true )))
4434
+ TypeAlias (LazyRef (force, reportCycles = true )))
4435
4435
cinfo.selfInfo match
4436
4436
case self : Type =>
4437
4437
cinfo.derivedClassInfo(
@@ -4990,14 +4990,14 @@ object Types {
4990
4990
derivedSuperType(tp, this (thistp), this (supertp))
4991
4991
4992
4992
case tp : LazyRef =>
4993
- LazyRef { c =>
4994
- val ref1 = tp.ref( using c)
4995
- if currentRunId( using c) == currentRunId(using mapCtx) then this (ref1)
4993
+ LazyRef {
4994
+ val ref1 = tp.ref
4995
+ if currentRunId == currentRunId(using mapCtx) then this (ref1)
4996
4996
else // splice in new run into map context
4997
4997
val saved = mapCtx
4998
4998
mapCtx = mapCtx.fresh
4999
- .setPeriod(Period (currentRunId( using c) , currentPhaseId(using mapCtx)))
5000
- .setRun(c .run)
4999
+ .setPeriod(Period (currentRunId, currentPhaseId(using mapCtx)))
5000
+ .setRun(ctx .run)
5001
5001
try this (ref1) finally mapCtx = saved
5002
5002
}
5003
5003
@@ -5658,9 +5658,9 @@ object Types {
5658
5658
}
5659
5659
}
5660
5660
5661
- private val keepAlways : AnnotatedType => Context => Boolean = _ => _ => true
5662
- private val keepNever : AnnotatedType => Context => Boolean = _ => _ => false
5663
- private val keepIfRefining : AnnotatedType => Context => Boolean = tp => ctx => tp .isRefining( using ctx)
5661
+ private val keepAlways : AnnotatedType => Context ? => Boolean = _ => true
5662
+ private val keepNever : AnnotatedType => Context ? => Boolean = _ => false
5663
+ private val keepIfRefining : AnnotatedType => Context ? => Boolean = _ .isRefining
5664
5664
5665
5665
val isBounds : Type => Boolean = _.isInstanceOf [TypeBounds ]
5666
5666
}
0 commit comments