Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Calling super methods doesn't always work, if method is missing in the proto chain. #6446
Unfortunately, this simple example it works.
But my code base is much more complicated: all the classes are class-factory mixins. If I leave out a method on one of the classes, which may be mixed in any order, then when the call stack reaches a prototype that doesn't not have the called method, I get an error like:
The line on which this happens is transpiled to look like this:
(ref = _get(Observable.prototype.__proto__ || _Object$getPrototypeOf(Observable.prototype), 'init', this)).call.apply(ref, [ this ].concat( args ));
The problem is that the
I am 100% sure that this is the case, but I'm not able to provide a reproduction yet.
If I simply add the missing method to the intermediate class, then it works:
Let me see if I can post back with a repro...
Hey @trusktr! We really appreciate you taking the time to report an issue. The collaborators
Hi @trusktr! A maintainer of the project has notified me that you're missing
Please understand that we receive a high volume of issues, and there are only a limited number
Please make sure you have the following information documented in this ticket:
Please provide either a link to the problem via the
To run, check out one of the branches, and
Potentially the useful link is trusktr/infamous@babel-issue-6446-working...babel-issue-6446-not-working
This doesn't appear to be a Babel issue. Stepping through your code shows that the