Skip to content

PerformanceDiagnostic: give an error if a generic non-copyable value with a deinit is captured by an escaping closure. #74988

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 1 commit into from
Jul 8, 2024

Conversation

eeckstein
Copy link
Contributor

Otherwise IRGen would crash.
It needs a bit of work to support alloc_box of generic non-copyable structs/enums with deinit, because we need to specialize the deinit functions, though they are not explicitly referenced in SIL. Until this is supported, give an error in such cases.

Fixes a compiler crash in IRGen
rdar://130283111

@eeckstein eeckstein requested review from kubamracek and removed request for xedin, slavapestov and hborla July 5, 2024 12:38
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

…with a deinit is captured by an escaping closure.

Otherwise IRGen would crash.
It needs a bit of work to support alloc_box of generic non-copyable structs/enums with deinit, because we need to specialize the deinit functions, though they are not explicitly referenced in SIL.
Until this is supported, give an error in such cases.

Fixes a compiler crash in IRGen
rdar://130283111
@eeckstein eeckstein force-pushed the allocbox-deinit-error branch from 154cab5 to 1a308ef Compare July 8, 2024 08:05
@eeckstein
Copy link
Contributor Author

@swift-ci smoke test

@eeckstein eeckstein merged commit 255a941 into swiftlang:main Jul 8, 2024
3 checks passed
@eeckstein eeckstein deleted the allocbox-deinit-error branch July 8, 2024 13:44
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.

2 participants