Skip to content

Commit badf872

Browse files
committed
Add comment
1 parent d5365c2 commit badf872

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/src/dotty/tools/dotc/cc/Capability.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ object Capabilities:
168168

169169
/** Is this fresh cap at the right level to be able to subsume `ref`?
170170
* Only outer freshes can be subsumed.
171+
* TODO Can we merge this with levelOK? Right now we use two different schemes:
172+
* - For level checking capsets with levelOK: Check that the visibility of the element
173+
* os not properly contained in the captset owner.
174+
* - For level checking elements subsumed by FreshCaps: Check that the widened scope
175+
* (using levelOwner) of the elements contains the owner of the FreshCap.
171176
*/
172177
def acceptsLevelOf(ref: Capability)(using Context): Boolean =
173178
if ccConfig.useFreshLevels && !CCState.collapseFresh then

0 commit comments

Comments
 (0)