# Bug report The __weakref__ slot is redefined when inherited from a class which didn't specify slots at all (and thus has a __dict__ and __weakref__ slots). ``` from dataclasses import dataclass class A: pass @dataclass(slots=True, weakref_slot=True) class B(A): pass ``` gives the following error: ``` TypeError: __weakref__ slot disallowed: either we already got one, or __itemsize__ != 0 ``` <!-- gh-linked-prs --> ### Linked PRs * gh-105870 * gh-116978 * gh-116979 <!-- /gh-linked-prs -->