Skip to content

[Constraint Solver] Don't perform a join when we've adjusted an IUO to an optional #5373

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
Oct 19, 2016

Conversation

DougGregor
Copy link
Member

This fixes an unintentional source-breaking change since Swift 3.0.

Resolves rdar://problem/28621624.

…o optional.

Fixes rdar://problem/28621624, an intentional source-breaking change
from Swift 3.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@DougGregor
Copy link
Member Author

@rudkx please review!

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.

@@ -1000,7 +1002,7 @@ static PotentialBindings getPotentialBindings(ConstraintSystem &cs,
}

if (exactTypes.insert(type->getCanonicalType()).second)
addPotentialBinding({type, kind, None});
addPotentialBinding({type, kind, None}, /*allowJoinMeet=*/!adjustedIUO);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is equivalent to !alternateType. Either works for me (with the current code having perhaps slightly more clarity given the naming), but I thought I would mention it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I felt like I wanted this to be super-IUO-specific. This goes away when we take IUOs out of the type system.

@swift-ci swift-ci merged commit d5e638f into swiftlang:master Oct 19, 2016
@DougGregor DougGregor deleted the iuo-infer-28621624 branch October 19, 2016 23:47
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