@@ -230,13 +230,13 @@ extension (tp: Type)
230
230
* cannot be propagated between sets. If `a <: b` and `a` acquires `x?` then
231
231
* `x` is propagated to `b` as a conservative approximation.
232
232
*
233
- * Maybe capabilities should only arise for caoture sets that appear in invariant
233
+ * Maybe capabilities should only arise for capture sets that appear in invariant
234
234
* position in their surrounding type. They are similar to TypeBunds types, but
235
235
* restricted to capture sets. For instance,
236
236
*
237
237
* Array[C^{x?}]
238
238
*
239
- * should be morally equivaelent to
239
+ * should be morally equivalent to
240
240
*
241
241
* Array[_ >: C^{} <: C^{x}]
242
242
*
@@ -441,17 +441,21 @@ object ReachCapabilityApply:
441
441
case Apply (reach, arg :: Nil ) if reach.symbol == defn.Caps_reachCapability => Some (arg)
442
442
case _ => None
443
443
444
- /** An extractor for `ref @annotation.internal.reachCapability`, which is used to express
445
- * the reach capability `ref*` as a type.
446
- */
447
444
class AnnotatedCapability (annot : Context ?=> ClassSymbol ):
448
445
def apply (tp : Type )(using Context ) =
449
446
AnnotatedType (tp, Annotation (annot, util.Spans .NoSpan ))
450
447
def unapply (tree : AnnotatedType )(using Context ): Option [SingletonCaptureRef ] = tree match
451
448
case AnnotatedType (parent : SingletonCaptureRef , ann) if ann.symbol == annot => Some (parent)
452
449
case _ => None
453
450
451
+ /** An extractor for `ref @annotation.internal.reachCapability`, which is used to express
452
+ * the reach capability `ref*` as a type.
453
+ */
454
454
object ReachCapability extends AnnotatedCapability (defn.ReachCapabilityAnnot )
455
+
456
+ /** An extractor for `ref @maybeCapability`, which is used to express
457
+ * the maybe capability `ref?` as a type.
458
+ */
455
459
object MaybeCapability extends AnnotatedCapability (defn.MaybeCapabilityAnnot )
456
460
457
461
0 commit comments