Closed as not planned
Description
Bug report
Bug description:
import abc
import dataclasses
import typing
SLOTS = False
@dataclasses.dataclass(slots=SLOTS)
class Base:
@abc.abstractmethod
def f(self) -> None:
pass
@dataclasses.dataclass(slots=SLOTS)
class Derived(Base):
@typing.override
def f(self) -> None:
super().f()
d = Derived()
d.f()
If SLOTS = False
, then this works. If SLOTS = True
, then it fails:
Traceback (most recent call last):
File "/app/output.s", line 24, in <module>
d.f()
~~~^^
File "/app/output.s", line 20, in f
super().f()
^^^^^^^^^
TypeError: super(type, obj): obj (instance of Derived) is not an instance or subtype of type (Derived).
CPython versions tested on:
3.13
Operating systems tested on:
Linux