[JSC] support CoverInitializedName in nested AssignmentPatterns
Created attachment 266144 [details] [JSC] support CoverInitializedName in nested AssignmentPatterns A regression introduced in bug https://bugs.webkit.org/show_bug.cgi?id=151026 causes the parser to fail when attempting to parse nested ObjectAssignmentPatterns with CoverInitializedName destructuring targets. This change fixes this by propagating the ExpressionErrorClass to the parent classifier when parsing properties and elements
Comment on attachment 266144 [details] [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
Comment on attachment 266144 [details] [JSC] support CoverInitializedName in nested AssignmentPatterns r=me
Created attachment 266373 [details] [JSC] support CoverInitializedName in nested AssignmentPatterns Rebased
Comment on attachment 266373 [details] [JSC] support CoverInitializedName in nested AssignmentPatterns meant to CQ the other patch last week, it probably won't apply on the bots now, so rebased
Comment on attachment 266373 [details] [JSC] support CoverInitializedName in nested AssignmentPatterns Clearing flags on attachment: 266373 Committed r192919: <http://trac.webkit.org/changeset/192919>
All reviewed patches have been landed. Closing bug.