Files
openide/python/testData/paramInfo/TopLevelOverloadsAndImplementation.py
Semyon Proshev f0ab4154ef PY-22971 Fixed: Support @typing.overload in regular Python files, not only in Python stubs
Update PyReferenceImpl to resolve to the latest definition of the callable and prepend it with overloads.
Update PyParameterInfoHandler and PyTypeChecker to take into account overloads only if they exist.
2017-05-13 00:17:45 +03:00

20 lines
221 B
Python

from typing import overload
@overload
def foo(value: None) -> None:
pass
@overload
def foo(value: int) -> str:
pass
@overload
def foo(value: str) -> str:
pass
def foo(value):
return None
foo(<arg1>)