Skip to content

Solve constraints from typevar upper bounds #13221

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

Closed

Conversation

hauntsaninja
Copy link
Collaborator

Fixes #13220

@hauntsaninja
Copy link
Collaborator Author

Well, mypy hated that.

I tried the following without success:

  • scoping it to just when upper_bound is builtins.object
  • moving the addition of the constraint to unify_generic_callable (which is where we need it)
  • then scoping that one just to when upper_bound is builtins.object
  • then removing the part in the solver where if there's a top type and no bottom type it picks the top type (as opposed to say, UninhabitedType)

@github-actions

This comment was marked as outdated.

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.

Incorrect subtyping with bound typevar
1 participant