-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclusive capabilities #22218
Draft
odersky
wants to merge
27
commits into
scala:main
Choose a base branch
from
dotty-staging:exclusive-capabilities
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Exclusive capabilities #22218
+1,863
−475
Conversation
This file contains 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
When printing a type `C^` where `C` extends `Capability`, don't show the `^`. This is overridden under -Yprint-debug.
Add dedicated tests `isMutableVar` and `isMutableVarOrAccessor` where we now check for the `Mutable` flag. This will allow to use `Mutable` also for update methods, so that we don't have to burn another flag bit for them.
Also, add design document from papers to docs/internals
This means Mutable classes get {cap.rd} as default capture set.
….toCap If existentials are mapped to fresh, it matters where they are opened. Pure or not arguments don't have anything to do with that.
Don't add elements to hidden sets if they were subsumed previously.
- Always store new types on rechecking - Store them in a hashmap which is associated with the rechecker of the current compilation unit - After rechecking is done, the map is forgotten, unless keepTypes is true. Under keepTypes, then map is kept in an attachment of the unit's root tree. Change in nomenclature: knownType --> nuType rememberType --> setNuType hasRememberedType --> hasNuType
odersky
force-pushed
the
exclusive-capabilities
branch
from
December 21, 2024 11:34
8ae9a33
to
8cbc022
Compare
- Use unsafeAssumeSeparate(...) as an escape hatch
odersky
force-pushed
the
exclusive-capabilities
branch
from
December 21, 2024 14:01
8cbc022
to
0a73a26
Compare
- In ++, use a FrozenSepState in order not to pollute hidden sets - This avoids two spurious separation failures in stdlib
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.
A draft PR to implement Capybara-like mutation checking