Skip to content

Fix #2677: Fix type of super selection #2757

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

Closed
wants to merge 5 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 14, 2017

Related fix: base classes (i.e. linearization) of AndTypes.

odersky added 3 commits June 14, 2017 17:03
List union is clearly wrong, as it is simply the same as ++.
It used to return the joint denotation, but the correct
answer is the denotation of the symbol in the joint denotation
as seen from the super prefix.
@@ -394,7 +394,10 @@ object Types {
case tp: ClassInfo =>
tp.cls.baseClasses
case AndType(tp1, tp2) =>
tp1.baseClasses union tp2.baseClasses
Copy link
Member

Choose a reason for hiding this comment

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

Seems like a good reason to not have union be defined on List :)

@odersky
Copy link
Contributor Author

odersky commented Jun 16, 2017

Replaced by #2768.

@odersky odersky closed this Jun 16, 2017
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.

2 participants