Skip to content

Description of capture set constraint handling #18966

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

Merged
merged 2 commits into from
Jan 14, 2024

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 17, 2023

... and a proposal how to better handle invariant mapped capture set variables

Still missing:

 - going to .super for other variables
 - maybe capabilities
@odersky
Copy link
Contributor Author

odersky commented Nov 17, 2023

The first nice outcome was that aligning the implementation with (some part) of the spec caused a pattern to compile
that previously failed (but it was stated that it should work).

@odersky odersky marked this pull request as draft November 17, 2023 14:35
@odersky odersky marked this pull request as ready for review January 6, 2024 18:39
@odersky odersky merged commit b5ecaa0 into scala:main Jan 14, 2024
@odersky odersky deleted the add-maybe-caps branch January 14, 2024 13:30
A capture checking constraint consists of subcapturing constraints between
capture sets. Capture sets can be variable or constant. A capture set variable is either defined by itself,
or is the result of a mapping of a type map.
Depending on what part of an original type created a map result, the set `v` is classified as invariant, covariant, or contravariant.
Copy link
Contributor

Choose a reason for hiding this comment

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

Which capture set is v referring to?

@Kordyjan Kordyjan added this to the 3.4.1 milestone Feb 14, 2024
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.

3 participants