[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 11:13:25 PST 2015


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

--- Comment #80 from Saam Barati <sbarati at apple.com> ---
(In reply to comment #79)
> (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.
Interesting. We currently don't throw on a second call to super().
That's bad, we should file a bug.

-- 
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/0cca3e85/attachment.html>


More information about the webkit-unassigned mailing list