-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[DEPRECATION] (WIP) calling this._super
when there is no method on parent class
#15082
Conversation
4b74787
to
402b5aa
Compare
packages/ember-metal/lib/mixin.js
Outdated
* | ||
*/ | ||
/* | ||
deprecate( |
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.
copy-pasta from within this file as a sanity check, it errors with:
Uncaught Error: Ember.required is deprecated as its behavior is inconsistent and unreliable.
Uncaught TypeError: Cannot read property 'registerDeprecationHandler' of undefined
Uncaught TypeError: Cannot read property 'extend' of undefined
packages/ember-metal/lib/mixin.js
Outdated
@@ -129,6 +138,23 @@ function giveMethodSuper(obj, key, method, values, descs) { | |||
|
|||
// Only wrap the new method if the original method was a function | |||
if (superMethod === undefined || 'function' !== typeof superMethod) { | |||
/* | |||
deprecate( |
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.
Uncaught Error: Calling `_super` when there is no method on the parent class is deprecated.
🤔
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.
deprecate
is meant to be executed at app runtime
this._super
when there is no method on parent class.this._super
when there is no method on parent class
this._super
when there is no method on parent classthis._super
when there is no method on parent class
this._super
when there is no method on parent classthis._super
when there is no method on parent class
Apologies for letting this work linger all this time 😞 At this point I think rebasing this PR would be more work than starting anew so I'm closing it for now. |
#14780
didDestroyElement
, only available in interactive mode