File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -536,19 +536,6 @@ class CleanupRetains(using Context) extends TypeMap:
536
536
RetainingType (tp, Nil , byName = annot.symbol == defn.RetainsByNameAnnot )
537
537
case _ => mapOver(tp)
538
538
539
- /** A typemap that follows aliases and keeps their transformed results if
540
- * there is a change.
541
- */
542
- trait FollowAliasesMap (using Context ) extends TypeMap :
543
- var follow = true // Used for debugging so that we can compare results with and w/o following.
544
- def mapFollowingAliases (t : Type ): Type =
545
- val t1 = t.dealiasKeepAnnots
546
- if follow && (t1 ne t) then
547
- val t2 = apply(t1)
548
- if t2 ne t1 then t2
549
- else t
550
- else mapOver(t)
551
-
552
539
/** An extractor for `caps.reachCapability(ref)`, which is used to express a reach
553
540
* capability as a tree in a @retains annotation.
554
541
*/
Original file line number Diff line number Diff line change @@ -6172,6 +6172,18 @@ object Types extends TypeUtils {
6172
6172
6173
6173
end BiTypeMap
6174
6174
6175
+ /** A typemap that follows aliases and keeps their transformed results if
6176
+ * there is a change.
6177
+ */
6178
+ trait FollowAliasesMap (using Context ) extends TypeMap :
6179
+ def mapFollowingAliases (t : Type ): Type =
6180
+ val t1 = t.dealiasKeepAnnots
6181
+ if t1 ne t then
6182
+ val t2 = apply(t1)
6183
+ if t2 ne t1 then t2
6184
+ else t
6185
+ else mapOver(t)
6186
+
6175
6187
abstract class TypeMap (implicit protected var mapCtx : Context )
6176
6188
extends VariantTraversal with (Type => Type ) { thisMap =>
6177
6189
You can’t perform that action at this time.
0 commit comments