Merged
Conversation
ee48108 to
e66d53a
Compare
They still were read-only, but all Capabilities implicitly capture `cap` now.
3ed1c87 to
958eb30
Compare
- this of a Mutable type is exclusive in update methods, read-only elsewhere - a selection from a mutable type with read-only capture set is again read-only
Need to disable `associateWithMutable` for them.
958eb30 to
6642e08
Compare
Treat them analogous to calls of update methods
- whether we record x or x.rd also depends on the exclusivity in context - fix issue of missing updates for denotations when recording use of a path
bracevac
approved these changes
Oct 22, 2025
noti0na1
reviewed
Oct 22, 2025
| Sometimes, disallowing assignments to mutable fields from normal methods is too restrictive. For instance: | ||
| ```scala | ||
| class Cache[T](eval: () -> T): | ||
| private transparent var x: T = compiletime.uninitialized |
Member
There was a problem hiding this comment.
I don't like reusing the keyword transparent again for another different meaning...
Contributor
Author
There was a problem hiding this comment.
We can certainly discuss this. Any suggestions what might be a better modifier?
122d5a2 to
b18794c
Compare
bracevac
reviewed
Oct 22, 2025
Contributor
There was a problem hiding this comment.
Not sure why my changes were overridden, but such changes should also be made in project/resources/referenceReplacements/sidebar.yml.
New doc page on mutability, split off from "Separation Checking".
b18794c to
1f7b608
Compare
Contributor
Author
|
Are there any tests from the mutability qualifiers paper that we could adapt to use here? Or from the paper that Ed presented at Scala Workshop? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whether something is mutable or not depends on the context: