Skip to content

[4.2] IRGen: Fix multi-payload enum lowering #17590

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

aschwaighofer
Copy link
Contributor

When we have a private resilient enum that is resilient because one of
its payloads is resilient but we have disabled resilience in the
context of lowering the enum as a class member (sigh), we must consider
it's payload's layout enum in the minimal domain (ignore the private
visibility) because we don't truly know the layout.

  • Scope: Private enums that contain a resilient payload and are used as
    a stored property inside of a class will cause crashes. This regression was introduced recently when we made resilient properties no resilient when used as stored properties in classes to fix ObjectiveC's incapability to handle resilient stored properties.

  • Risk: Low

  • Reviewed by: Slava

  • Testing: CI test cases added

rdar://41308521

When we have a private resilient enum that is resilient because one of
its payloads is resilient but we have disabled resilience in the
context of lowering the enum as a class member (sigh), we must consider
it's payload's layout enum in the minimal domain (ignore the private
visibility) because we don't truly know the layout.

* Scope: Private enums that contain a resilient payload and are used as
a stored property inside of a class will cause crashes
* Risk: Low
* Reviewed by: Slava
* Testing: CI test cases added
rdar://41308521
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please nominate

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