<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function created before super() causes TDZ, should it?"
   href="https://bugs.webkit.org/show_bug.cgi?id=149338#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [ES6] Arrow function created before super() causes TDZ, should it?"
   href="https://bugs.webkit.org/show_bug.cgi?id=149338">bug 149338</a>
              from <span class="vcard"><a class="email" href="mailto:sbarati&#64;apple.com" title="Saam Barati &lt;sbarati&#64;apple.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>I think we can be smart and not do anything if the &quot;this&quot;
isn't used in the arrow function. But after speaking with Joe, 
I believe it should never throw on construction. The &quot;this&quot;
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 &quot;this&quot; is evaluated inside the arrow function, we should
be okay. For example, this is ok:

class C {
    constructor() {
        let x = () =&gt; (false ? this : 20);
        x();
        super();
    }
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>