Skip to content

Support overloading with TypedDict arguments #3609

Closed
@JukkaL

Description

@JukkaL

Overloading isn't properly supported with TypedDict. Example:

from typing import overload, Iterable
from mypy_extensions import TypedDict

A = TypedDict('A', {'x': int})

@overload
def f(x: Iterable[str]) -> None: ...

@overload
def f(x: int) -> None: ...

def f(x): pass

a: A
f(a)  # No overload variant matches    <--- Should be fine due to Mapping fallback

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions