[Webkit-unassigned] [Bug 149338] [ES6] "super" and "this" should be lexically bound inside an arrow function and should live in a JSLexicalEnvironment

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 10 10:13:14 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=149338

--- Comment #79 from GSkachkov <gskachkov at gmail.com> ---
(In reply to comment #78)
> What happens when we call super once we've exited the constructor function?
> Is there anything in the spec on this? Does is mutate "this"?
> 
> Like:
> ```
> class C extends B {
>     constructor() {
>         this.weird = () => super();
>         super();
>     }
>     foo() { 
>         this.weird();
>     }
> }
> 
> (new C).foo();
> ```

I've not checked this case, but I'm sure that we can't run super() twice in constructor, second call should lead to RuntimeException. See tred on es6-discuss https://esdiscuss.org/topic/duplicate-super-call-behaviour. 
But this behavior is not related to the arrow function.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151110/944c62ad/attachment.html>


More information about the webkit-unassigned mailing list