[Webkit-unassigned] [Bug 151595] [JSC] support CoverInitializedName in nested AssignmentPatterns

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 25 06:11:52 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151595

--- Comment #2 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
Comment on attachment 266144
  --> https://bugs.webkit.org/attachment.cgi?id=266144
[JSC] support CoverInitializedName in nested AssignmentPatterns

View in context: https://bugs.webkit.org/attachment.cgi?id=266144&action=review

> Source/JavaScriptCore/tests/es6/destructuring_assignment_nested_cover_initialized_name.js:3
> +    ({ a: { b: { c = "it worked" } } } = { a: { b: {} } });

To explain the regression, we now parse as an expression first, and fallback on the assignment pattern parsing if it's an object literal followed by an `=`. In this case, when initially parsing the outer ObjectLiteral as an Expression, the error occurs on the inner ObjectLiteral, and it's not followed by an `=`, so an error is reported, but the error class does not indicate that the error allows reparsing as a Pattern.

the change communicates the error class to the outer classifier, so that nested pattern errors can be handled properly by parseAssignmentExpression

-- 
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/20151125/ebf66596/attachment-0001.html>


More information about the webkit-unassigned mailing list