Skip to content

[4.1][CSBindings] Form bindings correctly when they come from 'OptionalObject' constraint #14627

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
Feb 14, 2018

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Feb 14, 2018

Explanation: Fixes a bug in getPotentialBindings when the source of the bindings
is 'OptionalObject' constraint and type variable is on the left-hand
side of that constraint, that makes such type variable always have an
optional type since right-hand side of 'OptionalObject' is its 'object'
type.
Scope of Issue: Affects logic related to picking bindings for type variables in constraint solver.
Risk: Low risk; Fixes a bug in constraint solver.
Reviewed By: @rudkx
Testing: Compiler regression tests
Radar / SR: rdar://problem/37508855

Resolves: rdar://problem/37508855
(cherry picked from commit 5208049)

…ect' constraint

Fixes a bug in `getPotentialBindings` when the source of the bindings
is 'OptionalObject' constraint and type variable is on the left-hand
side of that constraint, that makes such type variable always have an
optional type since right-hand side of 'OptionalObject' is its 'object'
type.

Resolves: rdar://problem/37508855
(cherry picked from commit 5208049)
@xedin xedin requested a review from rudkx February 14, 2018 03:57
@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@swift-ci please test source compatibility

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!

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 13cb3bd

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@rudkx Looks like the test validation-test/Sema/type_checker_perf/fast/rdar32999041.swift.gyb you marked "fast" is actually flacky...

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@swift-ci please test macOS platform

@rudkx
Copy link
Contributor

rudkx commented Feb 14, 2018

@xedin Okay - do you want to disable in the 4.1 branch and open a JIRA and I will take a look at it on master?

We may want to move away from running the timed tests in CI. They might be more trouble than they are worth at the moment.

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@rudkx I think it would be fine if you increase the threshold to 1.5 or something, it seems like it's only happening on one of the platforms.

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@rudkx I'll try to do that a bit later today if you don't to that before me.

@rudkx
Copy link
Contributor

rudkx commented Feb 14, 2018

I opened a JIRA as well as PRs to disable it everywhere for now.

#14629

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@rudkx Thanks!

@xedin
Copy link
Contributor Author

xedin commented Feb 14, 2018

@swift-ci please nominate

@AnnaZaks AnnaZaks merged commit 9148b14 into swiftlang:swift-4.1-branch Feb 14, 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.

4 participants