Skip to content

[consume-operator] Emit a better error message when failing to consume globals or escaping captures. #68031

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

Conversation

gottesmm
Copy link
Contributor

Specifically, we previously emitted a "compiler doesn't understand error", so we were always emitting an error appropriately. This just gives a better error message saying instead that the compiler did understand what happened and that one cannot apply consume to globals or escaping captures.

#67755
rdar://112561671

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

…e globals or escaping captures.

Specifically, we previously emitted a "compiler doesn't understand error", so we
were always emitting an error appropriately. This just gives a better error
message saying instead that the compiler did understand what happened and that
one cannot apply consume to globals or escaping captures.

swiftlang#67755
rdar://112561671
@gottesmm gottesmm force-pushed the pr-6ddb1c42655a8548ef91d3b239d11cb084ff7b6d branch from 3265dc1 to 361562a Compare August 21, 2023 01:59
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit 924785f into swiftlang:main Aug 21, 2023
@gottesmm gottesmm deleted the pr-6ddb1c42655a8548ef91d3b239d11cb084ff7b6d branch August 21, 2023 04:22
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