Skip to content

6.1: [BitwiseCopyable] Fix resilient enum type info. #78174

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

nate-chandler
Copy link
Contributor

Explanation: Fix a compiler crash on resilient BitwiseCopyable enum.

TypeInfos for enums must store their corresponding EnumImplStrategys so that the latter can be looked up from the TypeInfo. Previously, the TypeInfo for resilient BitwiseCopyable enums was identical to the TypeInfo for all other kinds of types. This was incorrect because it didn't store the EnumImplStrategy. Here, a new sublcass is added which does store it as required.
Scope: Affects adopters of BitwiseCopyable.
Issue: rdar://141228350
Original PR: #78130
Risk: Low. Follows the existing pattern for resilient enum TypeInfo.
Testing: Added test.
Reviewer: Arnold Schwaighofer ( @aschwaighofer )

Like other `EnumTypeInfo`s, the `TypeInfo` subclasses `EnumTypeInfoBase`
and store the `EnumImplStrategy`.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review December 13, 2024 19:37
@nate-chandler nate-chandler requested a review from a team as a code owner December 13, 2024 19:37
@nate-chandler nate-chandler merged commit 0a22dd0 into swiftlang:release/6.1 Dec 14, 2024
5 checks passed
@nate-chandler nate-chandler deleted the cherrypick/release/6.1/rdar141228350 branch December 14, 2024 01:34
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