Skip to content
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

Do not ignore type parameters of receiver in method calls #376

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

b-studios
Copy link
Collaborator

@b-studios b-studios commented Jan 27, 2024

For now I am special casing the treatment of method calls to fix #373. What I do not like about this solution:

  • previously there was no freshTypeVar in Typer--it all was encapsulated behind instantiate.
  • now the treatment of method and function calls is not entirely uniform and slightly differs.

@b-studios b-studios requested a review from dvdvgt January 27, 2024 10:14
@b-studios
Copy link
Collaborator Author

b-studios commented Jan 27, 2024

To test this fix I added a few variations of #373. @dvdvgt could you double-check that this fix is working?

I also haven't tested @jiribenes's crazy variants that chain this bug. Might be worth checking, but I don't believe this should still be possible.

@dvdvgt
Copy link
Collaborator

dvdvgt commented Feb 1, 2024

Looks good to me and also seems to reject the "crazy" examples. One note, though, you only tested this using handlers, however I think it would be more robust if we had at least one negative test for objects as well. While they should do the same, the implementation is different and we should also test for this issue there. Besides, adding the more
elaborate examples as negatives tests too shouldn't hurt, right?

@b-studios
Copy link
Collaborator Author

Yeah I thought about adding them as well, but then they are really only instances of the tests already there. Each test, at least, adds time to CI :) (which is an excuse for me not to add it)

@b-studios b-studios merged commit 9c8a8c2 into master Feb 2, 2024
2 checks passed
@b-studios b-studios deleted the fix/issue373 branch February 2, 2024 15:59
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.

Function call type checking for operations
2 participants