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 @@ -637,19 +637,6 @@ class CleanupRetains(using Context) extends TypeMap:
637
637
RetainingType (tp, Nil , byName = annot.symbol == defn.RetainsByNameAnnot )
638
638
case _ => mapOver(tp)
639
639
640
- /** A typemap that follows aliases and keeps their transformed results if
641
- * there is a change.
642
- */
643
- trait FollowAliasesMap (using Context ) extends TypeMap :
644
- var follow = true // Used for debugging so that we can compare results with and w/o following.
645
- def mapFollowingAliases (t : Type ): Type =
646
- val t1 = t.dealiasKeepAnnots
647
- if follow && (t1 ne t) then
648
- val t2 = apply(t1)
649
- if t2 ne t1 then t2
650
- else t
651
- else mapOver(t)
652
-
653
640
/** An extractor for `caps.reachCapability(ref)`, which is used to express a reach
654
641
* capability as a tree in a @retains annotation.
655
642
*/
Original file line number Diff line number Diff line change @@ -6168,6 +6168,18 @@ object Types extends TypeUtils {
6168
6168
6169
6169
end BiTypeMap
6170
6170
6171
+ /** A typemap that follows aliases and keeps their transformed results if
6172
+ * there is a change.
6173
+ */
6174
+ trait FollowAliasesMap (using Context ) extends TypeMap :
6175
+ def mapFollowingAliases (t : Type ): Type =
6176
+ val t1 = t.dealiasKeepAnnots
6177
+ if t1 ne t then
6178
+ val t2 = apply(t1)
6179
+ if t2 ne t1 then t2
6180
+ else t
6181
+ else mapOver(t)
6182
+
6171
6183
abstract class TypeMap (implicit protected var mapCtx : Context )
6172
6184
extends VariantTraversal with (Type => Type ) { thisMap =>
6173
6185
You can’t perform that action at this time.
0 commit comments