Skip to content

[ConstraintSystem] Handle invalid pack element bindings during PackElementOf simplification. #64110

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
Mar 5, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Mar 5, 2023

mapElementTypeIntoPackContext asserts if the given type does not contain any element archetypes, so simplifyPackElementOfConstraint needs to gate the call behind a check for hasElementArchetype(). This allows simplification to gracefully fail when given an invalid pack element binding.

@hborla hborla requested a review from xedin as a code owner March 5, 2023 03:46
@hborla
Copy link
Member Author

hborla commented Mar 5, 2023

@swift-ci please smoke test

@hborla hborla merged commit 1715a1e into swiftlang:main Mar 5, 2023
@hborla hborla deleted the pack-element-of-crash branch March 5, 2023 06:18
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