<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:sbarati@apple.com" title="Saam Barati <sbarati@apple.com>"> <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@apple.com" title="Saam Barati <sbarati@apple.com>"> <span class="fn">Saam Barati</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=280110&action=diff" name="attach_280110" title="Patch">attachment 280110</a> <a href="attachment.cgi?id=280110&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=280110&action=review">https://bugs.webkit.org/attachment.cgi?id=280110&action=review</a>
r=me wth comments
<span class="quote">> Source/JavaScriptCore/parser/Parser.cpp:1929
> + functionScope->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">> Source/JavaScriptCore/tests/stress/arrow-functions-as-default-parameter-values.js:162
> + class D extends C {
> + x(y = (y = () => super.foo) => {return y()}) {
> + return y();
> + }
> + }</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">> LayoutTests/js/script-tests/parser-syntax-check.js:746
> +valid("class C { constructor() { this._x = 45; } get foo() { return this._x;} } class D extends C { x(y = (y = () => super.foo) => {return y()}) { return y(); } }")</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>