Skip to content

Sema: Fix ASTPrinter and opened element environments to handle nested pack expansion types [5.9] #67310

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

slavapestov
Copy link
Contributor

@slavapestov slavapestov commented Jul 14, 2023

  • Description: In a couple of places we incorrectly decided that a same-type requirement T.A == G<repeat each U> (where T.A is a scalar type) was a pack requirement, as if we were expanding the entire requirement across the each U. The ASTPrinter would prefix the requirement with repeat, and creating element archetypes would do the wrong thing and crash. Fix these places to correctly handle nested pack expansion types so that pack references bound by those expansions are not considered.

  • Radar: rdar://112108253

  • Reviewed by: @hborla

@slavapestov slavapestov requested a review from a team as a code owner July 14, 2023 20:15
@slavapestov slavapestov force-pushed the transform-type-parameter-packs-5.9 branch from 9efb175 to 764e33e Compare July 14, 2023 20:16
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov changed the title Sema: Fix opened element environments and an issue with variadic generic types in openType() Sema: Fix opened element environments and an issue with variadic generic types in openType() [5.9] Jul 14, 2023
@slavapestov slavapestov force-pushed the transform-type-parameter-packs-5.9 branch from 764e33e to feea23d Compare July 14, 2023 20:39
@slavapestov slavapestov changed the title Sema: Fix opened element environments and an issue with variadic generic types in openType() [5.9] Sema: Fix opened element environments [5.9] Jul 14, 2023
@slavapestov slavapestov changed the title Sema: Fix opened element environments [5.9] Sema: Fix ASTPrinter and opened element environments to handle nested pack expansion types [5.9] Jul 14, 2023
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test

@slavapestov slavapestov merged commit f6870b7 into swiftlang:release/5.9 Jul 18, 2023
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