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

Glen/fix interface inheritance types #153

Conversation

glentakahashi
Copy link

@sayresRT this should fix your bug and add in your test

The bug was previously that getInheritedProperties would not handle duplicates, and if two parents differed it was just the last one that won out. If the last one happened to equal your current property (as it happened to do in your use case), it would think they're compatible and remove just that one property.

Essentially what I did was rewrite the "getInheritedProperties" method to create a new "collision type" if two parents have differing types for a property. this means that the equality check when removing inherited props will fail and the class will include the property itself.

If you're two degrees away (i.e. your parent inherits incompatible properties), splitting the function into two recursive functions causes single classes to override their parents if they collide, which gives us the functionality that we want.

@glentakahashi glentakahashi force-pushed the glen/fix-interface-inheritance-types branch from 81bd80c to 830c13d Compare June 26, 2017 20:46
@glentakahashi
Copy link
Author

Closed because irrelevant now

@glentakahashi glentakahashi deleted the glen/fix-interface-inheritance-types branch June 28, 2017 11:00
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