We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This code should probably be valid:
from typing import Callable, Union, overload def f(fn: Callable[[Union[int, str]], Union[int, str]]) -> None: pass @overload def g(x: int) -> int: ... @overload def g(x: str) -> str: ... def g(x): ... f(g) # Currently error
I.e., an overloaded function should be a subtype of a suitable function with union type arguments and return value.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This code should probably be valid:
I.e., an overloaded function should be a subtype of a suitable function with union type arguments and return value.
The text was updated successfully, but these errors were encountered: