-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
Build failed |
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)
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test source compatibility |
2 similar comments
@swift-ci Please test source compatibility |
@swift-ci Please test source compatibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sigh. LGTM.
@swift-ci Please nominate. |
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.