<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><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> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Our parser doesn't properly parse default parameter expressions in a class method"
   href="https://bugs.webkit.org/show_bug.cgi?id=157872">bug 157872</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #280110 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Our parser doesn't properly parse default parameter expressions in a class method"
   href="https://bugs.webkit.org/show_bug.cgi?id=157872#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Our parser doesn't properly parse default parameter expressions in a class method"
   href="https://bugs.webkit.org/show_bug.cgi?id=157872">bug 157872</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>Comment on <span class=""><a href="attachment.cgi?id=280110&amp;action=diff" name="attach_280110" title="Patch">attachment 280110</a> <a href="attachment.cgi?id=280110&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=280110&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=280110&amp;action=review</a>

r=me wth comments

<span class="quote">&gt; Source/JavaScriptCore/parser/Parser.cpp:1929
&gt; +    functionScope-&gt;setExpectedSuperBinding(expectedSuperBinding);</span >

Can you remove the duplicate call below to setExpectedSuperKind(...)?

Also, I wonder if we should be calling setConstructKind up here too. I need to think about it more.

<span class="quote">&gt; Source/JavaScriptCore/tests/stress/arrow-functions-as-default-parameter-values.js:162
&gt; +    class D extends C {
&gt; +        x(y = (y = () =&gt; super.foo) =&gt; {return y()}) {
&gt; +            return y();
&gt; +        }
&gt; +    }</span >

Can you also add a test where we use super inside an arrow function inside a derived constructor's default parameter expression?

<span class="quote">&gt; LayoutTests/js/script-tests/parser-syntax-check.js:746
&gt; +valid(&quot;class C { constructor() { this._x = 45; } get foo() { return this._x;} } class D extends C { x(y = (y = () =&gt; super.foo) =&gt; {return y()}) { return y(); } }&quot;)</span >

Ditto for a constructor's syntax here</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>