Skip to content

Fix another subtle SE-0110-related break. #10847

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 2 commits into from
Jul 11, 2017
Merged

Fix another subtle SE-0110-related break. #10847

merged 2 commits into from
Jul 11, 2017

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jul 10, 2017

The change to roll back a part of SE-0110 to allow multi-argument
functions to be passed in places where functions taking a tuple are
expected resulted in a regression in some cases where the fix would
strip off the last ParenType from single-argument functions.

Instead of stripping off parens from both function types we're trying to
match when they both have them, strip off none. This ensures that we
don't get summarily rejected in the nested matchTypes call by other
SE-0110-related code that bails if the two types do not have the same
"parenness".

Fixes rdar://problem/33043106 / SR-5387.

@rudkx rudkx requested review from DougGregor and slavapestov July 10, 2017 18:52
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

LGTM as a narrower hack for SE-0110.

rudkx added 2 commits July 10, 2017 17:36
…ostics related to rdar://problem/33067102"

This reverts commit 70deaa8.

My next commit already added the same test case, but this reverted
commit added it in a way that the test will fail with my fix in place.
The change to roll back a part of SE-0110 to allow multi-argument
functions to be passed in places where functions taking a tuple are
expected resulted in a regression in some cases where the fix would
strip off the last ParenType from single-argument functions.

Instead of stripping off parens from both function types we're trying to
match when they both have them, strip off none. This ensures that we
don't get summarily rejected in the nested matchTypes call by other
SE-0110-related code that bails if the two types do not have the same
"parenness".

Fixes rdar://problem/33043106 / SR-5387.
@rudkx
Copy link
Contributor Author

rudkx commented Jul 11, 2017

I had to re-push to revert the just-merged 70deaa8, because it added a test in a way that it would break when my change went in.

It turns out my commit had a test case that is identical to the one in that change, so reverting rather than fixing up the test makes sense.

@rudkx
Copy link
Contributor Author

rudkx commented Jul 11, 2017

@swift-ci Please smoke test and merge

@rudkx
Copy link
Contributor Author

rudkx commented Jul 11, 2017

@swift-ci Please smoke test

@rudkx
Copy link
Contributor Author

rudkx commented Jul 11, 2017

@swift-ci Please test source compatibility

1 similar comment
@rudkx
Copy link
Contributor Author

rudkx commented Jul 11, 2017

@swift-ci Please test source compatibility

@rudkx rudkx merged commit 9f68dee into swiftlang:master Jul 11, 2017
@rudkx rudkx deleted the fix-rdar33043106 branch July 11, 2017 04:14
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