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

Proposal for @noImplicitCopy attribute for local variable and parameter bindings #1846

Closed
wants to merge 5 commits into from

Conversation

jckarter
Copy link
Contributor

No description provided.

// We can still use x because we only borrowed its payload

switch x {
case .some(borrow y):
Copy link
Contributor

Choose a reason for hiding this comment

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

Was shadowing 'y' intentional here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't any shadowing, really, since if borrow y would be out of scope by the time we reach the switch. But I can still change the name to be clear.

Also:
- handle editing feedback from @atrick and @benrimmington
- rename `take` to `consume` in alignment with SE-0366/SE-0377
@jckarter jckarter changed the title Proposal for @noImplicitCopy attribute for immutable bindings Proposal for @noImplicitCopy attribute for local variable and parameter bindings Dec 2, 2022
@jckarter
Copy link
Contributor Author

We're going a different direction with this.

@jckarter jckarter closed this May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants