Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Declaration.__add__ try harder to produce consistent resolution orders #238

Merged
merged 1 commit into from Apr 15, 2021

Conversation

jamadden
Copy link
Member

@jamadden jamadden commented Apr 1, 2021

By moving things from the RHS to the front of the list if they already extend something from the LHS.

Fixes #193

The changes in the documentation are a good example of the kind of weird things that used to happen but which should now make more sense. Previously, you could get IRoot2 ahead of IDerived2, which is inconsistent.

I'm not 100% positive this covers all possible cases (deeply nested hierarchies, branching at weird places) but it does fix the easy/common ones that I've seen in the real world. It can be improved as needed given further examples.

…orders.

By moving things from the RHS to the front of the list if they already extend something from the LHS.

Fixes #193
@jamadden
Copy link
Member Author

jamadden commented Apr 1, 2021

GitHub actions was having some issues with its Mac runners this morning, but they seem to be resolved and this PR is now green.

@jamadden jamadden requested a review from jensens April 5, 2021 10:31
@jamadden jamadden requested a review from icemac April 12, 2021 12:17
Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from reading the code.

@jamadden
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Declaration.__add__ easily produces inconsistent RO
2 participants