-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[CSSimplify] Fix matchCallArguments not to claim un-labeled argumen…
#18857
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
|
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad this one was improved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is unfortunate, but livable...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, because 2 is no longer re-ordered with a: 1, which I think is a more correct behavior.
|
@xedin Can you update the commit message to make it clear whether the example you're giving is the old behavior or the new behavior? For example you could provide the example and an explanation of what happened before, versus after your change. |
|
@rudkx Sure! It’s currently an error, but I fixed it to type-check... |
…ts too eagerly Avoid claiming un-labeled defaulted parameters by out-of-order un-labeled arguments or parts of variadic argument sequence, because that might be incorrect. The following example is supposed to type-check correctly but without these changes produces `missing argument for parameter swiftlang#4 in call` error, because `3` will be claimed as '_ b:': ```swift func foo(_ a: Int, _ b: Int = 0, c: Int = 0, _ d: Int) {} foo(1, c: 2, 3) ``` Resolves: rdar://problem/43525641
|
@rudkx How does the message look like now? |
|
@swift-ci please smoke test |
|
@swift-ci please test source compatibility |
|
Thanks, @xedin! |
…ts too eagerly
Avoid claiming un-labeled defaulted parameters
by out-of-order un-labeled arguments or parts
of variadic argument sequence, because that might
be incorrect:
Resolves: rdar://problem/43525641