@@ -206,6 +206,8 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
206206
207207 case class Var ()(implicit @ constructorOnly src : SourceFile ) extends Mod (Flags .Mutable )
208208
209+ case class Mut ()(implicit @ constructorOnly src : SourceFile ) extends Mod (Flags .Mutable )
210+
209211 case class Implicit ()(implicit @ constructorOnly src : SourceFile ) extends Mod (Flags .Implicit )
210212
211213 case class Given ()(implicit @ constructorOnly src : SourceFile ) extends Mod (Flags .Given )
@@ -332,6 +334,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
332334
333335 def isEnumCase : Boolean = isEnum && is(Case )
334336 def isEnumClass : Boolean = isEnum && ! is(Case )
337+ def isMutableVar : Boolean = is(Mutable ) && mods.exists(_.isInstanceOf [Mod .Var ])
335338 }
336339
337340 @ sharable val EmptyModifiers : Modifiers = Modifiers ()
@@ -518,14 +521,17 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
518521 def scalaUnit (implicit src : SourceFile ): Select = scalaDot(tpnme.Unit )
519522 def scalaAny (implicit src : SourceFile ): Select = scalaDot(tpnme.Any )
520523
524+ def capsInternalDot (name : Name )(using SourceFile ): Select =
525+ Select (Select (scalaDot(nme.caps), nme.internal), name)
526+
521527 def captureRoot (using Context ): Select =
522528 Select (scalaDot(nme.caps), nme.CAPTURE_ROOT )
523529
524530 def makeRetaining (parent : Tree , refs : List [Tree ], annotName : TypeName )(using Context ): Annotated =
525531 Annotated (parent, New (scalaAnnotationDot(annotName), List (refs)))
526532
527533 def makeCapsOf (tp : RefTree )(using Context ): Tree =
528- TypeApply (Select (scalaDot(nme.caps), nme.capsOf), tp :: Nil )
534+ TypeApply (capsInternalDot( nme.capsOf), tp :: Nil )
529535
530536 // Capture set variable `[C^]` becomes: `[C >: CapSet <: CapSet^{cap}]`
531537 def makeCapsBound ()(using Context ): TypeBoundsTree =
0 commit comments