More efficient code for deciding if a mixin forwarders is needed#5116
Merged
lrytz merged 1 commit intoscala:2.12.xfrom Apr 25, 2016
Merged
More efficient code for deciding if a mixin forwarders is needed#5116lrytz merged 1 commit intoscala:2.12.xfrom
lrytz merged 1 commit intoscala:2.12.xfrom
Conversation
| val m = member.overriddenSymbol(baseClass) | ||
| val isCompeting = m.exists && { | ||
| !m.owner.isTraitOrInterface || | ||
| (!m.isDeferred && !mixinSuperInterfaces.contains(m.owner)) |
Member
There was a problem hiding this comment.
How did you weigh the choice between this formulation mixinSuperInterfaces.contains(m.owner) and my proposal of mixinClass.isNonBottomSubclass(m.owner)? The latter amounts to a binary search over an existing data structure (the base type seq).
Member
Author
There was a problem hiding this comment.
I had a failure at some point because isNonBottomSubclass includes parent classes (not only traits/interfaces). I can't remember the details, so I pushed a commit here and trying it out. It looks like class members are handled in the line above (m.owner.isTraitOrInterface) so it shouldn't make a difference.
Contributor
|
--- a
+++ b
@@ -379,2 +379,3 @@
definitions.ImplicitAmbiguousClass
+ definitions.JUnitTestClass
definitions.MigrationAnnotationClass |
Also adds a warning on junit test methods that compile as default methods.
Member
Author
|
rebased, review by @retronym |
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up for #5085