Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Fix attribute type resolution with multiple inheritance#18415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
e8ccf89f04fd934d6bdf4503c14544ccc38File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -706,3 +706,29 @@ class C34(B3, B4): ... | ||
| class C41(B4, B1): ... | ||
| class C42(B4, B2): ... | ||
| class C43(B4, B3): ... | ||
| [case testMultipleInheritanceExplicitDiamondResolution] | ||
| # Adapted from #14279 | ||
| class A: | ||
| class M: | ||
| pass | ||
| class B0(A): | ||
| class M(A.M): | ||
| pass | ||
| class B1(A): | ||
| class M(A.M): | ||
| pass | ||
| class C(B0,B1): | ||
| class M(B0.M, B1.M): | ||
| pass | ||
| class D0(B0): | ||
| pass | ||
| class D1(B1): | ||
| pass | ||
| class D(D0,D1,C): | ||
| pass | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Should we expect an error for something like: CollaboratorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. We certainly should expect an error there as such an override violates LSP. But overrides are checked elsewhere, I'm only modifying inherited attributes compatibility checks in this PR. | ||
Uh oh!
There was an error while loading.Please reload this page.