-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
type variable escapes in application of higher-order function to a generic function #1506
Comments
Also, even when the input program has a type error, mypy should still not produce ill-formed types like |
Mypy is arguably doing the right thing in this case. The code sample contains a malformed generic function |
The type of
y
is not allowed to contain an unbound type variable. There should have been an errorNeed type annotation for variable
on the assignment toy
.(With
apply
having typedef apply(f: Callable[[int], int]) -> S
, mypy does give such an error.)The text was updated successfully, but these errors were encountered: