@@ -118,9 +118,9 @@ object SepCheck:
118
118
119
119
def clashing (ref : Capability )(using Context ): SrcPos | Null =
120
120
val refPeaks = ref.directPeaks
121
- if ! directPeaks .sharedPeaks(refPeaks).isEmpty then
121
+ if ! directPeaks.sharedPeaks(refPeaks).isEmpty then
122
122
var i = 0
123
- while i < size && refs(i).directPeaks .sharedPeaks(refPeaks).isEmpty do
123
+ while i < size && refs(i).directPeaks.sharedPeaks(refPeaks).isEmpty do
124
124
i += 1
125
125
assert(i < size)
126
126
locs(i)
@@ -232,13 +232,12 @@ object SepCheck:
232
232
* such that one of the following is true:
233
233
* 1.
234
234
* - one of the sets contains `r`
235
- * - the other contains a capability `s` or `s.rd` where `s` _covers_ `r`
235
+ * - the other contains a capability `s` or `s.rd` where `s` covers `r`
236
236
* 2.
237
237
* - one of the sets contains `r.rd`
238
- * - the other contains a capability `s` where `s` _covers_ `r`
238
+ * - the other contains a capability `s` where `s` covers `r`
239
239
*
240
- * A capability `s` covers `r` if `r` can be seen as a path extension of `s`. E.g.
241
- * if `s = x.a` and `r = x.a.b.c` then `s` covers `a`.
240
+ * @see covers in Capability
242
241
*/
243
242
private def overlapWith (other : Refs )(using Context ): Refs =
244
243
val refs1 = refs
@@ -343,11 +342,11 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
343
342
private def formalCaptures (arg : Tree )(using Context ): Refs =
344
343
arg.formalType.orElse(arg.nuType).spanCaptureSet.elems
345
344
346
- /** The span capture set if the type of `tree` */
345
+ /** The span capture set of the type of `tree` */
347
346
private def spanCaptures (tree : Tree )(using Context ): Refs =
348
347
tree.nuType.spanCaptureSet.elems
349
348
350
- /** The deep capture set if the type of `tree` */
349
+ /** The deep capture set of the type of `tree` */
351
350
private def deepCaptures (tree : Tree )(using Context ): Refs =
352
351
tree.nuType.deepCaptureSet.elems
353
352
@@ -588,7 +587,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
588
587
for ref <- used do
589
588
val pos = consumed.clashing(ref)
590
589
if pos != null then
591
- // println(i"consumed so far ${consumed.refs.toList} with peaks ${consumed.directPeaks .toList}, used = $used, exposed = ${ref.directPeaks }")
590
+ // println(i"consumed so far ${consumed.refs.toList} with peaks ${consumed.directPeaks.toList}, used = $used, exposed = ${ref.directPeaks }")
592
591
consumeError(ref, pos, tree.srcPos)
593
592
end checkUse
594
593
0 commit comments