File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ sealed trait Exists extends Capability
87
87
88
88
@ experimental
89
89
object internal :
90
+ import annotation .retainsArg
90
91
91
92
/** A wrapper indicating a type variable in a capture argument list of a
92
93
* @retains annotation. E.g. `^{x, Y^}` is represented as `@retains(x, capsOf[Y])`.
@@ -98,13 +99,13 @@ object internal:
98
99
* as `caps.reachCapability(x)`. When converted to CaptureRef types in capture sets
99
100
* they are represented as `x.type @annotation.internal.reachCapability`.
100
101
*/
101
- extension (x : Any ) def reachCapability : Any = x
102
+ extension (x : Any @ retainsArg ) def reachCapability : Any = x
102
103
103
104
/** Read-only capabilities x.rd which appear as terms in @retains annotations are encoded
104
105
* as `caps.readOnlyCapability(x)`. When converted to CaptureRef types in capture sets
105
106
* they are represented as `x.type @annotation.internal.readOnlyCapability`.
106
107
*/
107
- extension (x : Any ) def readOnlyCapability : Any = x
108
+ extension (x : Any @ retainsArg ) def readOnlyCapability : Any = x
108
109
109
110
/** An internal annotation placed on a refinement created by capture checking.
110
111
* Refinements with this annotation unconditionally override any
You can’t perform that action at this time.
0 commit comments