Skip to content

[5.0] Allow inout arguments that differ in optionality than the expected pa… #14246

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

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jan 29, 2018

…rameter.

Allow passing Optional as inout where
ImplicitlyUnwrappedOptional is expected, and vice-versa.

Swift 4.1 added a warning that overloading inouts by kind of optional
was deprecated and would be removed, but we didn't actually allow
people to remove an overload and pass arguments of the other kind of
optional to the remaining function.

Fixes rdar://problem/36913150

(cherry picked from commit 8cd99ebe722d709fb99e2320348f29e895fa4037)

@rudkx
Copy link
Contributor Author

rudkx commented Jan 29, 2018

@swift-ci Please smoke test

@rudkx rudkx changed the title Allow inout arguments that differ in optionality than the expected pa… [5.0] Allow inout arguments that differ in optionality than the expected pa… Jan 29, 2018
…rameter.

Allow passing Optional<T> as inout where
ImplicitlyUnwrappedOptional<T> is expected, and vice-versa.

Swift 4.1 added a warning that overloading inouts by kind of optional
was deprecated and would be removed, but we didn't actually allow
people to remove an overload and pass arguments of the other kind of
optional to the remaining function.

Fixes rdar://problem/36913150

(cherry picked from commit 8685ee0)
@rudkx
Copy link
Contributor Author

rudkx commented Jan 29, 2018

@swift-ci Please smoke test

@rudkx rudkx merged commit 50d83d7 into swiftlang:swift-5.0-branch Jan 30, 2018
@rudkx rudkx deleted the rdar36913150-5.0 branch January 30, 2018 00:56
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.

1 participant