Skip to content

Join computed suboptimally with multiple inheritance #4373

Description

@gvanrossum
classBase:
deffoo(self): passclassMix: passclassA(Mix, Base): passclassB(Mix, Base): passdeffoo() ->None:
a= [A(), B()]
reveal_type(a) # Shows Mixa.foo() # E: "Mix" has no attribute "foo"

Could we do something better here? Ideally the inferred type of a should be an anonymous subclass of Mix and Base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-inheritanceInheritance and incompatible overrides

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions