Skip to content

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

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 13, 2019

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 12, 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
(cherry picked from commit a80fa91)

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3e073d707b51b4c5dbf4b37a976f018bb181c854

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3e073d707b51b4c5dbf4b37a976f018bb181c854

…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
(cherry picked from commit a80fa91)
@xedin xedin force-pushed the rdar-50007727-5.1 branch from 3e073d7 to c3fbf54 Compare June 12, 2019 18:23
@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3e073d707b51b4c5dbf4b37a976f018bb181c854

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c3fbf54

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test Linux platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c3fbf54

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test macOS platform

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

There was an unrelated crash In LLDB...

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c3fbf54

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c3fbf54

@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2019

@swift-ci please test macOS platform

@xedin xedin merged commit 7cb820f into swiftlang:swift-5.1-branch Jun 13, 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.

2 participants