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

Handle captures in by-name parameters #14330

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 23, 2022

  • Infrastructure to deal with capturesets in byname parameters
  • Transform byname capture sets to regular capture sets in ElimByName

@odersky odersky added the cc-experiment Intended to be merged with cc-experiment branch on origin label Jan 23, 2022
@odersky odersky self-assigned this Jan 23, 2022
@odersky odersky marked this pull request as ready for review January 26, 2022 14:53
@odersky odersky force-pushed the cc-byname branch 3 times, most recently from e3bb56d to 24dc2c7 Compare January 26, 2022 15:33
 1. Infrastructure to deal with capturesets in byname parameters

 2. Handle retainsByName annotations in ElimByName

    Convert them to regular annotations on the generated function types.
    This enables capture checking on by-name parameters.

 3. Add a style warning for misleading by-name parameter type formatting.

    By-name types should be formatted `{...}-> T`. `{...} -> T` looks too much
    like a function type.
@odersky odersky merged commit 819132a into scala:cc-experiment Jan 27, 2022
@odersky odersky deleted the cc-byname branch January 27, 2022 16:33
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.

1 participant