@@ -523,7 +523,10 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
523523 def rootDot (name : Name )(implicit src : SourceFile ): Select = Select (Ident (nme.ROOTPKG ), name)
524524 def scalaDot (name : Name )(implicit src : SourceFile ): Select = Select (rootDot(nme.scala), name)
525525 def scalaAnnotationDot (name : Name )(using SourceFile ): Select = Select (scalaDot(nme.annotation), name)
526+ def scalaAnnotationInternalDot (name : Name )(using SourceFile ): Select = Select (scalaAnnotationDot(nme.internal), name)
526527 def scalaRuntimeDot (name : Name )(using SourceFile ): Select = Select (scalaDot(nme.runtime), name)
528+ def scalaCapsDot (name : Name )(using SourceFile ): Select = Select (scalaDot(nme.caps), name)
529+ def scalaCapsInternalDot (name : Name )(using SourceFile ): Select = Select (scalaCapsDot(nme.internal), name)
527530 def scalaUnit (implicit src : SourceFile ): Select = scalaDot(tpnme.Unit )
528531 def scalaAny (implicit src : SourceFile ): Select = scalaDot(tpnme.Any )
529532
@@ -553,16 +556,16 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
553556 Annotated (parent, annot)
554557
555558 def makeReachAnnot ()(using Context ): Tree =
556- New (ref(defn. ReachCapabilityAnnot .typeRef ), Nil :: Nil )
559+ New (scalaAnnotationInternalDot(tpnme.reachCapability ), Nil :: Nil )
557560
558561 def makeReadOnlyAnnot ()(using Context ): Tree =
559- New (ref(defn. ReadOnlyCapabilityAnnot .typeRef ), Nil :: Nil )
562+ New (scalaAnnotationInternalDot(tpnme.readOnlyCapability ), Nil :: Nil )
560563
561564 def makeOnlyAnnot (qid : Tree )(using Context ) =
562- New (AppliedTypeTree (ref(defn. OnlyCapabilityAnnot .typeRef ), qid :: Nil ), Nil :: Nil )
565+ New (AppliedTypeTree (scalaAnnotationInternalDot(tpnme.onlyCapability ), qid :: Nil ), Nil :: Nil )
563566
564567 def makeConsumeAnnot ()(using Context ): Tree =
565- New (ref(defn. ConsumeAnnot .typeRef ), Nil :: Nil )
568+ New (scalaCapsInternalDot(tpnme.consume ), Nil :: Nil )
566569
567570 def makeConstructor (tparams : List [TypeDef ], vparamss : List [List [ValDef ]], rhs : Tree = EmptyTree )(using Context ): DefDef =
568571 DefDef (nme.CONSTRUCTOR , joinParams(tparams, vparamss), TypeTree (), rhs)
0 commit comments