-
Notifications
You must be signed in to change notification settings - Fork 64
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
super relies on name of base class #259
Comments
this pattern can be found in this acorn plugin which is run under buble in acorn-node. it has a manual workaround for this case. |
transpiled output var Base = function Base () {};
Base.prototype.xyz = function xyz () {};
var Enhanced = enhance(Base)
var inst = new Enhanced()
inst.xyz()
function enhance (Klass) {
Klass = /*@__PURE__*/(function (Klass$1) {
function Klass () {
Klass$1.apply(this, arguments);
}
if ( Klass$1 ) Klass.__proto__ = Klass$1;
Klass.prototype = Object.create( Klass$1 && Klass$1.prototype );
Klass.prototype.constructor = Klass;
Klass.prototype.xyz = function xyz () {
Klass.prototype.xyz.call(this)
};
return Klass;
}(Klass))
return Klass
} the Klass.prototype.xyz.call(this) but it should be Klass$1.prototype.xyz.call(this) |
I believe 0c06cae attempted to fix this—we didn't upgrade to the latest Bublé yet in acorn-node. Not sure if it's still an issue in 0.20.0 |
I verified it's an issue on 0.20.0, the transpired output above is from that version |
Ohh I see, this is about |
The text was updated successfully, but these errors were encountered: