Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Partial method enhancement #462
Partial method enhancement #462
Changes from 5 commits
88a0d89
0c48817
9644a47
fc2f444
68651c5
60d502d
9faf4e8
4a01f8f
e49b5b8
7522d3e
ee5fbea
b43ef98
a12269b
aaf5c63
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The error message has been improved when an Objective-C selector cannot be found matching the provided arguments.
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 is technically correct, but isn't intuitive to read. I'd suggest creating the original
order
as a tuple comprehension; then this can be justrest = order
, and the version in the else branch isrest = ("",) + order
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.
A minor cosmetic detail, but the quotes added by
!r
aren't needed here, because the identifier can't ever have spaces or anything else that might be ambiguous.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 won't confirm if arg1 and arg2 are being handled in the right order, as the addition is commutative. Something like
2*arg1 + 3*arg2
(or evenarg1 - arg2
) would let us confirm that arg1 and arg2 are being handled in the right order.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.
There's no need to have these extra methods just to demonstrate we can't call them correctly. The test will work just as well by calling
Example.overloaded(0, notAnArgument=10)
. It would be arguably better to useoverloaded:...
, because there are more options, and some of them are ambiguous.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 test confirms we're calling the right method, but doesn't verify that the arguments are passed in as expected. Ideally the result should incorporate the values from the arguments.