[Webkit-unassigned] [Bug 149338] [ES6] Arrow function created before super() causes TDZ, should it?

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 17:57:11 PDT 2015


--- Comment #3 from Saam Barati <sbarati at apple.com> ---
I think we can be smart and not do anything if the "this"
isn't used in the arrow function. But after speaking with Joe, 
I believe it should never throw on construction. The "this"
should be under TDZ, which means it should be only dependent on
time and not location in code. So, as long as super() is invoked
before a "this" is evaluated inside the arrow function, we should
be okay. For example, this is ok:

class C {
    constructor() {
        let x = () => (false ? this : 20);

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/20150919/1862bcc0/attachment-0001.html>

More information about the webkit-unassigned mailing list