Merge inherits interface members#5359
Merged
Merged
Conversation
Previously it assumed that if a class was present in the merge, only the class base types needed to be used. This became false when classes and interfaces could be merged.
Both interfaces and classes have base classes/interfaces; all members are available on an instance of the merged child.
A couple of tests were previously updated to give an incorrect error message.
Member
Author
|
I forgot to update the baselines in the last commit. I'll update them shortly to fix the build. |
I found that merging a class that has no base with an interface that has a base class causes a crash because `getDefaultConstructSignatures` assumes that any base must be a class base. Which was true in the previously buggy state.
Covers the case when the merged interface extends an interface, but the merged class does not extend a class, then trying to extend that class.
Contributor
There was a problem hiding this comment.
i would move this to the bottom where it is used. this way we are not creating an empty array literal for every class. so that classes with no base types can share the sentinel empty array value.
Contributor
|
👍 |
sandersn
added a commit
that referenced
this pull request
Oct 23, 2015
Merge inherits interface members
Contributor
|
We will need to cherrypick this into release-1.7 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #5347
This bug has been around since July but we didn't notice it until recently.
getBaseTypesassumed that if a class was present in the merge, only the class base types needed to be used -- it skipped the interface base types entirely. This became false when [ambient] classes and interfaces could be merged.