-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUGFIX] fix detect usage for native class polymorphism #6767
Conversation
5eac704
to
294d399
Compare
Asset Size Report for 294d399 EmberData has not changed in sizeIf any packages had changed sizes they would be listed here. Changeset
Full Asset Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense given the way polymorphism works currently. I'm assuming this means that you can't inherit from a class that has the polymorphic mixin, you have to mixin it in directly (or as close as you can with native classes).
This would have the side effect that you can inherit from a polymorphic class, if you are using classic class syntax:
const Foo = Model.extend(MyMixin);
// This will pass the check
const Bar = Foo.extend();
Does that make sense?
@pzuraq it does. If we were failing to detect mixins from things being extended before then this is an even better bugfix :) Hopefully we can get away from class based polymorphism soon :D |
* polymorphic relations and native classes mixins bug test * [BUGFIX] fix detect usage for native class polymorphism
* polymorphic relations and native classes mixins bug test * [BUGFIX] fix detect usage for native class polymorphism
* polymorphic relations and native classes mixins bug test * [BUGFIX] fix detect usage for native class polymorphism
* polymorphic relations and native classes mixins bug test * [BUGFIX] fix detect usage for native class polymorphism
resolves #6728
Ports the test from #6727 and adds a fix