gh-94607: Fix subclassing generics (GH-94610)

Co-authored-by: Serhiy Storchaka <3659035+serhiy-storchaka@users.noreply.github.com>
4 files changed