-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Closed
Copy link
Labels
callsIssues relating to call-signature checking and diagnosticsIssues relating to call-signature checking and diagnosticsdiagnosticsRelated to reporting of diagnostics.Related to reporting of diagnostics.overloads
Description
Currently we emit a very opaque "No overload of bound method __init__ matches" diagnostic, with zero additional context: no reference to the called function, its overloads, what failed to match, etc.
Sample code:
from typing import overload
@overload
def f(x: int) -> int: ...
@overload
def f(x: str) -> str: ...
def f(x: int | str) -> int | str:
return x
f(b"foo")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
callsIssues relating to call-signature checking and diagnosticsIssues relating to call-signature checking and diagnosticsdiagnosticsRelated to reporting of diagnostics.Related to reporting of diagnostics.overloads