@@ -118,9 +118,9 @@ object SepCheck:
118118
119119 def clashing (ref : Capability )(using Context ): SrcPos | Null =
120120 val refPeaks = ref.directPeaks
121- if ! directPeaks .sharedPeaks(refPeaks).isEmpty then
121+ if ! directPeaks.sharedPeaks(refPeaks).isEmpty then
122122 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
124124 i += 1
125125 assert(i < size)
126126 locs(i)
@@ -232,13 +232,12 @@ object SepCheck:
232232 * such that one of the following is true:
233233 * 1.
234234 * - 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`
236236 * 2.
237237 * - 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`
239239 *
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
242241 */
243242 private def overlapWith (other : Refs )(using Context ): Refs =
244243 val refs1 = refs
@@ -343,11 +342,11 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
343342 private def formalCaptures (arg : Tree )(using Context ): Refs =
344343 arg.formalType.orElse(arg.nuType).spanCaptureSet.elems
345344
346- /** The span capture set if the type of `tree` */
345+ /** The span capture set of the type of `tree` */
347346 private def spanCaptures (tree : Tree )(using Context ): Refs =
348347 tree.nuType.spanCaptureSet.elems
349348
350- /** The deep capture set if the type of `tree` */
349+ /** The deep capture set of the type of `tree` */
351350 private def deepCaptures (tree : Tree )(using Context ): Refs =
352351 tree.nuType.deepCaptureSet.elems
353352
@@ -588,7 +587,7 @@ class SepCheck(checker: CheckCaptures.CheckerAPI) extends tpd.TreeTraverser:
588587 for ref <- used do
589588 val pos = consumed.clashing(ref)
590589 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 }")
592591 consumeError(ref, pos, tree.srcPos)
593592 end checkUse
594593
0 commit comments