<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] fix error message for eval/arguments CoverInitializedName in strict code"
href="https://bugs.webkit.org/show_bug.cgi?id=152304#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] fix error message for eval/arguments CoverInitializedName in strict code"
href="https://bugs.webkit.org/show_bug.cgi?id=152304">bug 152304</a>
from <span class="vcard"><a class="email" href="mailto:caitp@igalia.com" title="Caitlin Potter (:caitp) <caitp@igalia.com>"> <span class="fn">Caitlin Potter (:caitp)</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=267380&action=diff" name="attach_267380" title="Patch (smaller/broken)">attachment 267380</a> <a href="attachment.cgi?id=267380&action=edit" title="Patch (smaller/broken)">[details]</a></span>
Patch (smaller/broken)
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=267380&action=review">https://bugs.webkit.org/attachment.cgi?id=267380&action=review</a>
self-review:
<span class="quote">> Source/JavaScriptCore/parser/Parser.cpp:2892
> + if (classifier.indicatesPossiblePattern() && (pattern && !match(EQUAL)))</span >
This fixes the case `({ eval = 0 } = {})`, but the `for({index=0; index+=1;} index++<=10; index*2;) { arr.add(""+index);};` Sputnik test fails as well, since it's n'either a valid pattern nor a valid expression. Probably the thing to do is avoid unnecessary re-parsing in this case, and just update the expected error to be the unexpected semicolon, and avoid re-parsing as an expression.
This probably means replacing all of the `if (kind == DestructureToExpressions) return 0;` bits with a proper error message, and most likely fixing a bunch of layout tests. Doing this means the simpler fix in code should work just fine.</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>