Skip to content

[ConstraintSystem] Use an explicit generic argument constraint for UnresolvedSpecializeExpr. #66657

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 15, 2023

The eager generic argument matching code in CSGen for unresolved specializations was incorrect because it didn't account for parameter packs. Fortunately, a constraint to delay explicit generic argument matching already exists for macros. Use it here. This also fixes a longstanding issue where references to generic typealiases were handled incorrectly in expressions, leading to bogus and misleading error messages.

rdar://110800793

UnresolvedSpecializeExpr.

The eager generic argument matching code in CSGen for unresolved
specializations was incorrect because it didn't account for parameter
packs. Fortunately, a constraint to delay explicit generic argument
matching already exists for macros. Use it here.
@hborla
Copy link
Member Author

hborla commented Jun 15, 2023

@swift-ci please smoke test

@hborla hborla marked this pull request as ready for review June 15, 2023 07:28
@hborla hborla requested review from slavapestov and xedin as code owners June 15, 2023 07:28
@hborla
Copy link
Member Author

hborla commented Jun 15, 2023

@swift-ci please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you! I love the years-old FIXMEs in the tests going away.

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