-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Unscoped classifier #24470
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
Add Unscoped classifier #24470
Conversation
- FreshCaps with Unscoped classifier are assumed to be owned by the enclosing toplevel class - FreshCaps with unscoped classifier are not turned into ResultCaps in the return types of anonymous functions.
Also: Improve consume message
f0f61ed to
21e7a30
Compare
Allow both .only[C] and .rd (in this order).
If a class has fresh fields and all fields are read-only, only imply `cap.rd`, not `cap`.
Treat it like an expression `e` instead.
We don't want to know what the argument type was, since a consume parameter gets integrated in the class cap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: We still have some quirks w.r.t. classifiers which should be addressed in a follow-up PR.
bracevac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We also need to make sure that scaladoc still works.
It should once this is merged, because it still relies on read-only not being a .only.
At the same time, drop Read classifier and the idea that .rd is a kind of restriction. That does not work anymore since
.rdhas to be combinable with classified capabilities likeUnscoped.