Skip to content

[5.0] Restore a very narrow function argument conversion for -swift-version 4. #14481

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

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Feb 8, 2018

Allow functions with type (()) -> T to be passed in places where we
expect () -> T, but only for -swift-version 4 (for -swift-version 3
this already works due to other horrible things in CSSimplify.cpp).

We need to look at how we can help migrate these cases to
-swift-version 5, but in the meantime, but that is something we can
consider separately.

Fixes rdar://problem/36670720 / https://bugs.swift.org/browse/SR-6796

(cherry picked from commit 6310aca)

rudkx added 2 commits February 8, 2018 00:06
Allow functions with type `(()) -> T` to be passed in places where we
expect `() -> T`, but only for -swift-version 4 (for -swift-version 3
this already works due to other horrible things in CSSimplify.cpp).

We need to look at how we can help migrate these cases to
-swift-version 5, but in the meantime, but that is something we can
consider separately.

Fixes rdar://problem/36670720 / https://bugs.swift.org/browse/SR-6796

(cherry picked from commit 6310aca)
Move the existing test into Compatibility/tuple_arguments_4.swift.
Move the Swift 3 test, Compatibility/tuple_arguments.swift, into
Compatibility/tuple_arguments_4.swift.

Add a couple new tests to each file to capture what we do in each
mode.

Overall this doesn't seem like the most satisfying approach for
covering compatibility testing in our standard commit testing, but
it's all we've got at the moment.

(cherry picked from commit 5a02541)
@rudkx
Copy link
Contributor Author

rudkx commented Feb 8, 2018

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 63f8a92 into swiftlang:swift-5.0-branch Feb 8, 2018
@rudkx rudkx deleted the fix-sr6796-5.0 branch February 8, 2018 16:30
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.

2 participants