Skip to content

[Parser] Don't warn about unescaping the _ in foo(_: 3). #8252

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
Mar 22, 2017

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Mar 21, 2017

foo(_: 3) is equivalent to foo(3), so calling a function that has _ as
an argument label (func foo(`_`: 3)) still requires the _ to be
escaped. Before this patch, the compiler would suggest removing the `s,
even though that changes behaviour.

Fixes rdar://problem/31077797.

foo(_: 3) is equivalent to foo(3), so calling a function that has _ as
an argument label (func foo(`_`: 3)) still requires the _ to be
escaped. Before this patch, the compiler would suggest removing the `s,
even though that changes behaviour.

Fixes rdar://problem/31077797.
@huonw
Copy link
Contributor Author

huonw commented Mar 21, 2017

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor

:-( I think it's still a bug that we take (_: 3) as equivalent to (3).

@huonw huonw merged commit 124b293 into swiftlang:master Mar 22, 2017
@huonw huonw deleted the underscore-label branch March 22, 2017 17:29
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