Skip to content

[ConstraintSystem] NFC: Unify type variable and disjunction choice re… #19117

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
Sep 5, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Sep 4, 2018

…presentation

Introduce TypeBinding interface with a single attempt method
which is useful to encapsulate specific binding logic used for
attempting disjunction choices and type variable bindings under
a single interface. This makes it easier to unify top-level logic
responsible for binding enumeration.

It should also make it possible to introduce unified binding producer
interface in the future.

@xedin xedin requested a review from rudkx September 4, 2018 05:49
@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2018

@rudkx I have renamed both type variable and disjunction choice generators into producers and unified their interface to use Optional<{TypeVarBinding|DisjunctionChoice}> operator () (), I think it would be possible to introduce BindingProducer interface with Optional<TypeBinding> operator ()() method to unify them completely.

…presentation

Introduce `TypeBinding` interface with a single `attempt` method
which is useful to encapsulate specific binding logic used for
attempting disjunction choices and type variable bindings under
a single interface. This makes it easier to unify top-level logic
responsible for binding enumeration.

It should also make it possible to introduce unified binding producer
interface in the future.
@xedin xedin force-pushed the introduce-type-binding branch from d42c1fa to e5b63fa Compare September 4, 2018 06:28
Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

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

LGTM.

@xedin
Copy link
Contributor Author

xedin commented Sep 4, 2018

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Sep 4, 2018

Build failed
Swift Test Linux Platform
Git Sha - d42c1fa4ecfbb22060a00fb7bc49cab53958a413

@swift-ci
Copy link
Contributor

swift-ci commented Sep 4, 2018

Build failed
Swift Test OS X Platform
Git Sha - d42c1fa4ecfbb22060a00fb7bc49cab53958a413

@xedin xedin merged commit be1aae4 into swiftlang:master Sep 5, 2018
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