Skip to content

Sema: Fix inconsistent behavior with SE-0110-related compatibility hack #22783

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

Conversation

slavapestov
Copy link
Contributor

Back when SE-0110 was implemented we decided that passing a function value
taking multiple parameters would be allowed where a function value taking
a single tuple argument was expected.

Due to quirks in the old function type representation, the "splat" in the
other direction sometimes worked too. When we redid the function type
representation we added a simulation of the old quirk for -swift-version 4
mode.

However this simulation was itself problematic because it only worked when
the function value being passed was a non-overloaded declaration reference.

Slightly broaden the hack to the overloaded case, to prevent user
confusion when adding or removing overloads.

Back when SE-0110 was implemented we decided that passing a function value
taking multiple parameters would be allowed where a function value taking
a single tuple argument was expected.

Due to quirks in the old function type representation, the "splat" in the
other direction sometimes worked too. When we redid the function type
representation we added a simulation of the old quirk for -swift-version 4
mode.

However this simulation was itself problematic because it only worked when
the function value being passed was a non-overloaded declaration reference.

Slightly broaden the hack to the overloaded case, to prevent user
confusion when adding or removing overloads.
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Thank you! Maybe you want I'd like to take a look at https://bugs.swift.org/browse/SR-9954 while you are at it? :)

@xedin
Copy link
Contributor

xedin commented Feb 21, 2019

Wrong JIRA, trying to find the one I really wanted to mention...

@xedin
Copy link
Contributor

xedin commented Feb 21, 2019

This one - https://bugs.swift.org/browse/SR-9860

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

1 similar comment
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test Linux

@slavapestov slavapestov merged commit 05d3c4b into swiftlang:master Feb 21, 2019
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