Skip to content

[6.0] SILGen: Emit empty type initialization for conditionally-copyable type inits. #72468

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Mar 20, 2024

Explanation: Fixes a crash when an empty ~Copyable type has a conditional Copyable conformance.
Scope: Fixes an assertion failure that could potentially lead to miscompiles in a release build.
Issue: rdar://125101955
Original PR: #72464
Risk: Low. One line bug fix.
Testing: Swift CI
Reviewer: @nate-chandler

@jckarter jckarter requested a review from a team as a code owner March 20, 2024 21:11
…e inits.

Fix the check here to go by `isMoveOnly` on the lowered type rather than
`canBeCopyable` on the declaration so that we correctly emit the
semantic initialization for types that are `~Copyable` in their most
generic form. Fixes rdar://125101955.
@jckarter jckarter force-pushed the init-conditionally-copyable-empty-type-6.0 branch from ffc1d4a to 355c0c9 Compare March 20, 2024 21:16
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit db221d5 into swiftlang:release/6.0 Mar 21, 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.

5 participants