You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to extend the System.constructor in a ES2015 class syntax and transpile with Babel the SystemJSLoader is not getting invoked.
The issue is only reproducible with Babel transpiler, Traceur works fine. The discrepancy hides in the way super is implemented:
Babel: _get(Object.getPrototypeOf(SubClass.prototype), 'constructor', this).call(this); which returns the constructor of SuperClass prototype Traceur: $traceurRuntime.superConstructor(SubClass).call(this); which returns the SuperClass
Trying to extend the System.constructor in a ES2015 class syntax and transpile with Babel the
SystemJSLoader
is not getting invoked.The issue is only reproducible with Babel transpiler, Traceur works fine. The discrepancy hides in the way
super
is implemented:Babel:
_get(Object.getPrototypeOf(SubClass.prototype), 'constructor', this).call(this);
which returns the constructor of SuperClass prototypeTraceur:
$traceurRuntime.superConstructor(SubClass).call(this);
which returns the SuperClassNote: Related issue on babel side: babel/babel#2048
The text was updated successfully, but these errors were encountered: