Skip to content

[ConstraintSystem] Fix a property wrapper constraint generation crash. #36611

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 29, 2021

Conversation

hborla
Copy link
Member

@hborla hborla commented Mar 26, 2021

The property wrapper initializer type passed into generateWrappedPropertyTypeConstraints can be a type variable if the wrapper type has a failable initializer. To avoid attempting to lookup the wrapped value type on a type variable, always open the outermost wrapper attribute type and add an equality constraint to the initializer type.

Resolves: rdar://70238041

@hborla hborla requested a review from xedin March 26, 2021 22:41
@hborla
Copy link
Member Author

hborla commented Mar 26, 2021

@swift-ci please test source compatibility

@hborla
Copy link
Member Author

hborla commented Mar 26, 2021

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Mar 26, 2021

@swift-ci please smoke test macOS platform

2 similar comments
@hborla
Copy link
Member Author

hborla commented Mar 27, 2021

@swift-ci please smoke test macOS platform

@hborla
Copy link
Member Author

hborla commented Mar 29, 2021

@swift-ci please smoke test macOS platform

@hborla
Copy link
Member Author

hborla commented Mar 29, 2021

@swift-ci please test Windows platform

@hborla hborla merged commit 71cd85c into swiftlang:main Mar 29, 2021
@hborla hborla deleted the property-wrapper-csgen-crash branch March 29, 2021 17:58
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