Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Nov 6, 2025

  1. Mutable and ExclsuiveCapability are not longer classifiers. This means Mutable classes can capture other capabilities. Read is still a classifier.

  2. Update methods in nested classes can access exclusive capabilities external to enclosing classes.

@odersky odersky requested a review from a team as a code owner November 6, 2025 12:48
@odersky odersky force-pushed the drop-mutable-classifier branch from d8ec775 to 676b85f Compare November 6, 2025 12:56
@Linyxus Linyxus self-requested a review November 6, 2025 13:48
@natsukagami natsukagami self-requested a review November 6, 2025 13:58
 1. Mutable and ExclsuiveCapability are not longer classifiers. This means
    Mutable classes can capture other capabilities. Red is still a classifier.

 2. Update methods in nested classes can access exclsuive capabilities external
    to enclosing classes.
 - Allow to charge read-only set on unboxing (previously it was always the exclusive set that
   was charged).
 - Treat also methods outside Mutable types as read-only members. Previously we charged
   read-only when calling a read-only method of a mutable type, but not when calling an inherited
   method such as `eq`.
 - Use the same criterion for read-only everywhere.
 - Distinguish between read- and write-accesses to mutable fields.
…hecking

We do get sometimes capabilities like `async.rd` where `async` is shared. It
does not look straightforward to prevent that, so instead we count async.rd
as shared if async is.
@odersky odersky force-pushed the drop-mutable-classifier branch from 2bc9435 to d40f1f9 Compare November 8, 2025 19:40
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