File tree Expand file tree Collapse file tree 5 files changed +463
-195
lines changed
compiler/src/dotty/tools/dotc/cc
_docs/reference/experimental/capture-checking Expand file tree Collapse file tree 5 files changed +463
-195
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,8 @@ extension (tp: Type)
352352 case _ =>
353353 false
354354
355- /** Is this a type extending `Mutable` that has update methods
356- * or non-private mutable fields?
355+ /** Is this a type extending `Mutable` that has non-private update methods
356+ * or mutable fields?
357357 */
358358 def isMutableType (using Context ): Boolean =
359359 tp.derivesFrom(defn.Caps_Mutable )
Original file line number Diff line number Diff line change @@ -640,9 +640,9 @@ object CaptureSet:
640640 else " "
641641
642642 private def capImpliedByCapability (parent : Type )(using Context ): Capability =
643- if parent.derivesFromExclusive then GlobalCap .readOnly else GlobalCap
643+ if parent.derivesFromMutable then GlobalCap .readOnly else GlobalCap
644644
645- /* The same as {cap.rd } but generated implicitly for references of Capability subtypes.
645+ /* The same as {cap} but generated implicitly for references of Capability subtypes.
646646 */
647647 class CSImpliedByCapability (parent : Type )(using @ constructorOnly ctx : Context )
648648 extends Const (SimpleIdentitySet (capImpliedByCapability(parent)))
You can’t perform that action at this time.
0 commit comments