Skip to content

[5.9][Diagnostics] Suppress printing explicit pack types in the ASTPrinter instead of stripping PackType out of diagnostic arguments. #66653

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 2 commits into from
Jun 15, 2023

Conversation

hborla
Copy link
Member

@hborla hborla commented Jun 14, 2023

… instead of

stripping PackType out of diagnostic arguments.

There are places in the type printing code that assume the substitution for a
type parameter pack is always a pack, and violating that invariant will crash
the compiler. We also never want to print 'Pack{...}' in diagnostics anyway,
so the print option is a better approach and fixes a few existing tests that still
contained 'Pack{...}' in error messages.

(cherry picked from commit e42667b)
@hborla hborla requested a review from a team as a code owner June 14, 2023 23:21
@hborla
Copy link
Member Author

hborla commented Jun 14, 2023

@swift-ci please test

@hborla
Copy link
Member Author

hborla commented Jun 15, 2023

@swift-ci please test

@hborla hborla merged commit 994e1b3 into swiftlang:release/5.9 Jun 15, 2023
@hborla hborla deleted the 5.9-pack-diagnostics branch June 15, 2023 07:20
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