-
Notifications
You must be signed in to change notification settings - Fork 348
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
Removes MismatchedCount argument swapping workaround #103
Removes MismatchedCount argument swapping workaround #103
Conversation
Well spotted! Do you think you could toss a unit test into Thanks! |
As I was trying to figure out what is expected/actual in each context, I found some other improvements to make to the MismatchedType error messages. I will look into the CI errors, I think the |
9498a00
to
b18fd1c
Compare
The last error isn't related to this swapping issue anymore. It just became appearant because of the unit test improvements. Edit: |
@cipharius I believe we currently intentionally type check the program with ignored values because in some cases it's intentional, and some functions esp. in standard library may return more arguments than you realize. So this test should probably check for no errors and have a comment that it's okay to have the right hand side of the assignment to produce more values than the left hand side does. |
This last commit implements the suggestion made by @zeux and leaves a note on why only required values > returned values case is considered. After the review, should I squash the commits into one, or do you prefer them to be separate? |
There's no need to squash the commits manually - we have the repository set up so that squashes are enforced during PR merge. |
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.
Thanks!
It is not clear why this workaround exists here, but it seems to be outdated as of now. Instead of correcting the error message at the return site, it produces an incorrect message:
Unfortunately I could not run the test suite due to build error that I could not resolve. I will create an issue for this error.