Error when inheriting from a generic dataclass with a generic attribute #12063
Labels
bug
mypy got something wrong
topic-dataclasses
topic-inheritance
Inheritance and incompatible overrides
Bug Report
When typechecking the following code:
The equivalent code with the parent class NOT a data class:
Does not error.
If A_ is a normal class and B_ is marked as a dataclass, it also does not error. In other words it is the parent class that must be "un-dataclassed" as a workaround.
Your Environment
I have reproduced this on a recent version of mypy and python, but encountered it first in a python 3.6 environment, so it is not a new regression.
mypy.ini
(and other config files): NoneThe text was updated successfully, but these errors were encountered: