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

Look at arguments when generating constraints for an overload #8845

Merged
merged 1 commit into from
May 19, 2020

Conversation

msullivan
Copy link
Collaborator

This improves a lot of cases. I'm not totally sure why we skipped the
arguments in the past.

This improves a lot of cases. I'm not totally sure why we skipped the
arguments in the past.
@msullivan msullivan requested review from ilevkivskyi and JukkaL May 18, 2020 22:57
@@ -486,12 +486,11 @@ def infer_against_overloaded(self, overloaded: Overloaded,
template: CallableType) -> List[Constraint]:
# Create constraints by matching an overloaded type against a template.
# This is tricky to do in general. We cheat by only matching against
# the first overload item, and by only matching the return type. This
# the first overload item that is callable compatible. This
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is 8 years old. I think this answers your question in the PR description.

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.

2 participants