Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Nov 18, 2025

At the same time, drop Read classifier and the idea that .rd is a kind of restriction. That does not work anymore since .rd has to be combinable with classified capabilities like Unscoped.

 - 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.
This reverts commit 9abbb03.
This reverts commit 0a0e666.
This reverts commit 67ba9b5.

Read-only cannot be a classifier anymore, since it would overlap with Unscoped,
but neither subsumes the other.
@odersky odersky requested a review from a team as a code owner November 18, 2025 13:00
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants