Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Refactor reversible operators #5475
This pull request refactors and reworks how we handle reversible operators like
Specifically, what our code was previously doing was assuming that given the expression
Unfortunately, it seems like this model was a little too naive, which caused several mismatches/weird errors when I was working on refining how we handle overlaps and TypeVars in a subsequent PR.
Specifically, what actually happens is that...
This pull request modifies both checker.py and checkexpr.py to match this behavior, and adds logic so that we check the calls in the correct order.
This ended up slightly changing a few error messages in certain edge cases.
Thanks! Looks good, I have several comments, all of them are minor.
Great, thanks! You can merge this after you fix the last few comments here. Then rebase the overlap PR and I will review it.