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

Miscellaneous CC fixes and tweaks #20564

Closed
wants to merge 4 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 13, 2024

Fixes the problem in effect-swaps.scala

odersky added 2 commits June 13, 2024 11:21
Fixes the problem in effect-swaps.scala
This gives us the necessary levers to switch to existential capabilities.
@odersky odersky changed the title Tighten rules against escaping local references Miscellaneous CC fixes and tweaks Jun 13, 2024
odersky added 2 commits June 13, 2024 15:23
An expandedUniversalSet was the same as `{cap}` but not reference-equal
to CaptureSet.universal. This construct was previously needed to avoid
multiple expansions, but this does not seem to be the case any longer so
the construct can be dropped.
The encoding of (x: T) => U in capture checked code has changed.

Previously: T => U' { def apply(x: T): U }
Now: (T -> U' { def apply(x: T): U })^{cap}

We often handle dependent functions by transforming the apply method and then mapping
back to a function type using `.toFunctionType`. But that would always generate a
pure function, so the impurity info could get lost.
@odersky
Copy link
Contributor Author

odersky commented Jul 25, 2024

All commits were merged via branch cc-ex-2

@odersky odersky closed this Jul 25, 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.

1 participant