-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SILGen] Make #function printing more consistent. #19062
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
Print parens and "_:" in cases where a function has no named parameters. We already print the parens in cases with no parameters, and the "_:" for unnamed parameters in cases where there are already named parameters. Fixes: rdar://problem/19785368
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux platform |
@swift-ci Please clean smoke test Linux platform |
Looks good to me. This might deserve a heads up on the swift forums (if you haven't already) in case people are relying on the old behavior. |
@shahmishal Mishal, any idea what's going on with this Linux build failure? |
@jckarter Sure, I'll post a heads-up on the user forum. |
That's a change from this PR. The assertion is looking for the old name and needs to be updated. |
@jrose-apple Ah yes, there is a real failure in the tests as well. I hadn't gotten past this:
|
Those errors are apparently some weird but harmless thing that CI latches onto as "the error" when something else goes wrong. That's being tracked in rdar://problem/43165161. |
@swift-ci Please smoke test and merge |
In Swift 5, the value of `#function` for e.g. `func count(_:)` has changed from `count` to `count(_:)` (see swiftlang/swift#19062), causing `wrap` to produce invalid SQL. We fix this by only using the part of `#function` preceding the first opening parenthesis.
Print parens and "_:" in cases where a function has no named
parameters.
We already print the parens in cases with no parameters, and the "_:"
for unnamed parameters in cases where there are already named
parameters.
Fixes: rdar://problem/19785368