Mutability
Handling mutability and read-only access
Attributes
- Graph
-
- Supertypes
- Self type
-
Mutability.type
Members list
Value members
Concrete methods
Adapt type actual so that it represents a read-only access if needed. actual is the widened version of original with capture set improved by the VAR rule. One of the following conditions must hold for adaptions to be applied (see modularity.md, section "Read-Only Accesses" for context):
Adapt type actual so that it represents a read-only access if needed. actual is the widened version of original with capture set improved by the VAR rule. One of the following conditions must hold for adaptions to be applied (see modularity.md, section "Read-Only Accesses" for context):
- The
originalreference is athisof a type extending Stateful and the access is not from an update method of the class ofthis. - The
originalreference refers to a type extending Stateful and is a path where a prefix of that path has a read-only capture set. - The expected type corresponding to some part of
actualthat refers to a type extending Stateful is a value type that is not a stateful type. In that case this part is adapted to a read-only capture set.
Attributes
Check that we can call an update method of qualType or perform an assignment of a field of qualType.
Check that we can call an update method of qualType or perform an assignment of a field of qualType.
Attributes
Apply caps.freeze(...). Strip all capture sets of covariant Mutable types, turning them into CaptureSet.emptyOfMutable. Only Mutable types that contribute to the overall capture set are considered, since that is the set analyzed by consume/use checking. That means that double-flip covariant and boxed capture sets are not dropped.
Apply caps.freeze(...). Strip all capture sets of covariant Mutable types, turning them into CaptureSet.emptyOfMutable. Only Mutable types that contribute to the overall capture set are considered, since that is the set analyzed by consume/use checking. That means that double-flip covariant and boxed capture sets are not dropped.
Attributes
Extensions
Extensions
Map ref to ref.readOnly if its type extends Mutble, and one of the following is true:
Map ref to ref.readOnly if its type extends Mutble, and one of the following is true:
- it appears in a non-exclusive context,
- the expected type is a value type that is not a stateful type,
- the expected type is a read-only selection
Attributes
A read-only member is a lazy val or a method that is not an update method.
A read-only member is a lazy val or a method that is not an update method.
Attributes
An update method is either a method marked with update or a setter of a field of a Stateful class that's not annotated with @uncheckedCaptures. update is implicit for consume methods of Stateful classes.
An update method is either a method marked with update or a setter of a field of a Stateful class that's not annotated with @uncheckedCaptures. update is implicit for consume methods of Stateful classes.
Attributes
Is this a type extending Stateful that has non-private update methods or mutable fields?
Is this a type extending Stateful that has non-private update methods or mutable fields?