lexical 'super' in arrow functions?

Claus Reinke claus.reinke at talk21.com
Mon Dec 3 02:00:58 PST 2012

>>> Is 'super' currently limited to method bodies, excluding local functions?
>>> Given that 'this' is lexical in arrow functions, I expected any enclosing
>>> 'super' to be available, as well, but I cannot confirm this from the spec.
> Yes, clearly super should be able to be used in an arrow function that is lexically scoped to an 
> enclosing super binding.  The mechanism for describing this are mostly in the spec., but I just 
> checked and there are a few loose ends that I will clean-up in the next spec. draft.

That would be good.

>>> This is from listening in on some of the TypeScript traffic, where people
>>> are running into all kind of issues when trying to use ES6 classes, btw. Claus
> Do you have a link to the threads?  Sounds interesting...

TS traffic is somewhat distributed, and mixed between TS bugs,
non-JS users not wanting TS to follow JS, and discussions actually
relevant to ES development.

Still, it does seem to attract actual users to a language with ES6
features, and those are providing feedback and questions from
trying to use these features on their current projects.




Remove the search keywords or try the RSS feeds to follow all traffic.


More information about the es-discuss mailing list