Fw: lexical 'super' in arrow functions?

Rick Waldron waldron.rick at gmail.com
Sun Dec 2 21:49:43 PST 2012


On Sun, Dec 2, 2012 at 3:13 PM, Claus Reinke <claus.reinke at talk21.com>wrote:

> First attempt got lost or stuck somewhere, trying again.
>
> ------------------------------**--------------------
> From: "Claus Reinke" <claus.reinke at talk21.com>
> Sent: Thursday, November 29, 2012 10:02 PM
> To: <es-discuss at mozilla.org>
> Subject: lexical 'super' in arrow functions?
>
>  Is 'super' currently limited to method bodies, excluding local functions?
>>
>
"super" is limited to ClassBody


>> 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.
>>
>
Can you clarify... did you mean something like:

class Mine extends Array {
  constructor(...args) {
    this.foo = () => {
  super(...args);
    };
  }
}

?




>
>> 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.
>>
>
I've been following all of the tickets and offering support wherever I
can—I'd love to see the specific cases that you're referring to.


Rick




>  Claus
>> http://clausreinke.github.com/
>>
>>  ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121203/593a5f92/attachment.html>


More information about the es-discuss mailing list