Skip to content

[4.1] Fix SR-6837 - allow function conversion for -swift-version 4 *only* #14455

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 7, 2018
Merged

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Feb 7, 2018

  • Explanation: We broke compatibility with something we did not intend to support, but accidentally did, in Swift 4 (and had previously in Swift 3).

  • Scope of Issue: In some cases we allowed functions taking an N-tuple to be passed where functions taking N individual arguments were expected.

  • Origination: A change was made to make function types more consistent, to avoid exactly this kind of "emergent behavior".

  • Risk: The fix here is very targeted, so the risk seems low.

  • Bug: rdar://problem/36875195 / https://bugs.swift.org/browse/SR-6837

  • Reviewed By: Doug Gregor

  • Testing: Regression tests and source compatibility testing.

@rudkx rudkx changed the title Fix SR-6837 - allow function conversion for -swift-version 4 *only* [4.1] Fix SR-6837 - allow function conversion for -swift-version 4 *only* Feb 7, 2018
@rudkx rudkx requested review from xedin and DougGregor February 7, 2018 06:46
@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please test

@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - e167119a632d504145cb501227c033f75ac4c0a1

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - e167119a632d504145cb501227c033f75ac4c0a1

We inadvertantly allowed a function conversion for Swift 4 that we did
not intend to allow.

This commit adds an extremely narrow fix to continue to allow this for
-swift-verson 4 only.

Fixes rdar://problem/36875195 / https://bugs.swift.org/browse/SR-6837

(cherry picked from commit 1de9897)
@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test OS X Platform
Git Sha - e167119a632d504145cb501227c033f75ac4c0a1

@swift-ci
Copy link
Contributor

swift-ci commented Feb 7, 2018

Build failed
Swift Test Linux Platform
Git Sha - e167119a632d504145cb501227c033f75ac4c0a1

@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please test source compatibility

2 similar comments
@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please test source compatibility

@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please test source compatibility

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.

Sigh. LGTM.

@rudkx
Copy link
Contributor Author

rudkx commented Feb 7, 2018

@swift-ci Please nominate.

@rudkx rudkx merged commit b091e73 into swiftlang:swift-4.1-branch Feb 7, 2018
@rudkx rudkx deleted the fix-sr6837-4.1 branch February 7, 2018 22:34
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