Skip to content

[ConstraintSystem] Fix a constraint system crash with property wrapper inference using the $ syntax. #37380

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
May 12, 2021

Conversation

hborla
Copy link
Member

@hborla hborla commented May 12, 2021

  • Fix a constraint system crash that occurred when the contextual parameter type for a closure parameter using the $ syntax didn't exist, either because the contextual closure type was not a function type or the closure body used too many parameters.
  • Always use the parameter name for closure parameter diagnostics. This simplifies the diagnostic emission logic in a few places, and it uses the correct name for closure parameters with the $ prefix that are non anonymous.

Resolves: rdar://77793820

hborla added 2 commits May 11, 2021 18:26
resolving a closure, create a new type variable for inferred property
wrapper types.
…gnostics,

because the $ prefix does not indicate that the parameter is anonymous.
@hborla hborla requested a review from xedin May 12, 2021 01:35
@hborla
Copy link
Member Author

hborla commented May 12, 2021

@swift-ci please smoke test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM! Disappointed in myself for missing this during feature review…

@hborla hborla merged commit e159131 into swiftlang:main May 12, 2021
@hborla hborla deleted the property-wrapper-inference-crash branch May 12, 2021 15:55
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