This is a limitation of Babel and not at all a reflection of the actual
specification. This restriction is imposed order to follow ES2015 semantics of
not being able to reference `this` before `super()`. It does a pretty dumb
check of only allowing it to be strictly after the call (ie. not before or
inside it). Note that this is also the behaviour of Traceur and TypeScript so
Babel is not alone with this decision. You can see extensive discussion of this
in the issue: https://github.com/babel/babel/issues/1131
On Tue, Jun 2, 2015 at 11:36 PM, Matthew Robb <matthewwr...@gmail.com>
wrote:
> I was trying to demonstrate a simple method of exposing resolve and reject
> functions to someone and noticed in Babel at least you cannot do this. It
> seems as though in this case when the arrow function is called it will have
> been AFTER the call to super.
> Can someone help me understand what's going on here?
> - Matthew Robb
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss