Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix is_overlapping_types() logic for fallback instances #7351
This also fixes an unrelated issue that went unnoticed because of a poor test (in that case the problem was because of a callable fallback, which is a metaclass for class objects).
@Michael0x2a if you don't have time to review this soon, then I will merge without waiting to unblock an internal pin move.
Michael0x2a left a comment
I think this seems reasonable.
The fact that this disallows overloads with literals and subclasses of ints also seems reasonable -- such APIs seem like an antipattern to me anyways.
Maybe we should add a test case for the overload example? Otherwise LGTM.