Skip to content

[5.9] Fix the type-lowering verifier to handle pack expansions #64965

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

rjmccall
Copy link
Contributor

@rjmccall rjmccall commented Apr 6, 2023

5.9 version of #64951.

Explanation: There's a check we do when producing a TypeLowering object that checks that certain type properties are consistent with the directly-stored values in the type. I'm not sure it's a very useful piece of code, but unless we remove it, it needs to do the right thing with pack expansions, which it currently isn't.
Scope: Crashes in SILGen when assertions are enabled and when a tuple contains a pack expansion element where the a pattern type that has interesting type properties that the verifier checks; generally this means something like repeat Array<each T>
Issue: rdar://107664237
Risk: Low; straightforward change to handle a type that's specific to variadic generics
Testing: Regression tests added
Reviewer: Slava Pestov

@rjmccall rjmccall requested a review from a team as a code owner April 6, 2023 03:08
@rjmccall
Copy link
Contributor Author

rjmccall commented Apr 6, 2023

@swift-ci Please test

@rjmccall rjmccall merged commit d2a359e into swiftlang:release/5.9 Apr 6, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants