Something went wrong while setting issue due date.
Unexpected token using arrow notation returning class with "extends"
Hi Buble team!
I found a bug where I am using arrow notation that returns a class having "extends" keyword extending a base class and got an "Unexpected token" error.
The source:
// this produces "Unexpected token" error
const mixin = (Base) =>
class Test extends Base {
}
Transpile result:
// this produces "Unexpected token" error
var mixin = function (Base) (function (Base) {
{ return function Test () {
Base.apply(this, arguments);
}if ( Base ) Test.__proto__ = Base;
Test.prototype = Object.create( Base && Base.prototype );
Test.prototype.constructor = Test;
return Test;
}(; }Base))
As for now, enclosing the arrow notation with bracket "{ class Classname extends Base {} return Classname; }" temporarily resolves the issue.
I hope this helps. Thanks :-)
Diko
- Tech Slave