<!-- If you're new to mypy and you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help" form instead. Please also consider: - checking our common issues page: https://mypy.readthedocs.io/en/stable/common_issues.html - searching our issue tracker: https://github.com/python/mypy/issues to see if it's already been reported - asking on gitter chat: https://gitter.im/python/typing --> **Bug Report** <!-- Note: If the problem you are reporting is about a specific library function, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues --> Mypy reports an error when a `TypedDict` is passed as an argument to a function that is annotated as accepting `dict`s more generally. **To Reproduce** ```python class TestDict(TypedDict): a: int def myfunc(test: dict): print(test) myfunc(TestDict(a=2)) ``` Note that: ```python >>> type(TestDict(a=2)) <class 'dict'> ``` **Expected Behavior** <!-- How did you expect your project to behave? It’s fine if you’re not sure your understanding is correct. Write down what you thought would happen. If you just expected no errors, you can delete this section. --> No error. **Actual Behavior** <!-- Did something go wrong? Is something broken, or not behaving as you expected? --> ``` error: Argument 1 to "myfunc" has incompatible type "TestDict"; expected "Dict[Any, Any]" [arg-type] myfunc(TestDict(a=2)) ^ ``` **Your Environment** <!-- Include as many relevant details about the environment you experienced the bug in --> - Mypy version used: 0.960 (compiled: yes) - Python version used: 3.9.10 <!-- You can freely edit this text, please remove all the lines you believe are unnecessary. -->