Skip to content

[ConstraintSystem] Use lightweight conformance check in determining w… #25348

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
Jun 12, 2019

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 11, 2019

…hether literal could be initialized via coercion

Currently logic to transform call into coercion uses conformsToProtocol
to validate that type conforms to one of the ExpressibleBy*Literal protocols.

That function doesn't handle unbound generic parameters and would result in
an infinite loop or a crash when not all of the generic parameters were
explicitly specified for one of the types in the chain e.g. A.B(42)
where A has at least one generic parameter.

Resolves: rdar://problem/50007727

@xedin xedin requested a review from DougGregor June 11, 2019 08:22
@xedin
Copy link
Contributor Author

xedin commented Jun 11, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d19007bf235df12d5ea83969b9f02cf0dc6d8eb9

@xedin
Copy link
Contributor Author

xedin commented Jun 11, 2019

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d19007bf235df12d5ea83969b9f02cf0dc6d8eb9

@xedin
Copy link
Contributor Author

xedin commented Jun 11, 2019

@shahmishal Looks like there are a lot of lldb failures, have you seen anything like that recently?

@xedin
Copy link
Contributor Author

xedin commented Jun 11, 2019

@swift-ci please smoke test macOS platform

…hether literal could be initialized via coercion

Currently logic to transform call into coercion uses `conformsToProtocol`
to validate that type conforms to one of the ExpressibleBy*Literal protocols.

That function doesn't handle unbound generic parameters and would result in
an infinite loop or a crash when not all of the generic parameters were
explicitly specified for one of the types in the chain e.g. `A.B(42)`
where `A` has at least one generic parameter.

Resolves: rdar://problem/50007727
@xedin
Copy link
Contributor Author

xedin commented Jun 11, 2019

@swift-ci please smoke test

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Jun 11, 2019

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test source compatibility

@xedin xedin merged commit ba412a9 into swiftlang:master Jun 12, 2019
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.

3 participants