Skip to content
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

More additions to the standard library #18799

Merged
merged 89 commits into from
Nov 5, 2023
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 30, 2023

... and fixes to make that happen.

@odersky odersky requested a review from Linyxus October 30, 2023 20:34
@odersky odersky added the cc-experiment Intended to be merged with cc-experiment branch on origin label Oct 30, 2023
@odersky odersky force-pushed the more-stdlib branch 2 times, most recently from 45c7724 to f6cd5c0 Compare November 1, 2023 15:51
The logic gets refused by the added capture refinements.
Also count abstract types that have a @Sealed annotation on their bound
as sealed. That way, we get free propagation into synthesized type parameters.
We should probably unify this scheme and `sealed` modifiers.
This needs to be refined further for class members, similar to how
we check that private types cannot escape from a class API.
The tricky thing here is how to recognize that a class is pure since
that is known only during capture checking and we are at Setup, the
phase before. But we can approximate by treating the `Pure` trait
as definitely pure.
(capture checks out of the box)
@odersky
Copy link
Contributor Author

odersky commented Nov 4, 2023

@Linyxus Cursory review is fine. Just to get an idea what's in the PR.

Copy link
Contributor

@Linyxus Linyxus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the changes to the capture checker and several stdlib files that caught my eyes, but didn't manage to go through every new capture checked library file. LGTM overall!

@odersky
Copy link
Contributor Author

odersky commented Nov 5, 2023

This is the first version of collections in the standard library that is compiled with capture checking on. We'll use that as a baseline for a comprehensive test case when we refine the capture checking scheme.

@odersky odersky merged commit ef97ee2 into scala:main Nov 5, 2023
18 checks passed
@odersky odersky deleted the more-stdlib branch November 5, 2023 11:19
odersky added a commit to dotty-staging/dotty that referenced this pull request Nov 6, 2023
This reverts commit ef97ee2, reversing
changes made to 5454110.
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cc-experiment Intended to be merged with cc-experiment branch on origin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants