mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
A CoverInitializedName such as `{ a = 0 }` (object shorthand with default) is
only valid when the enclosing object literal is refined into a destructuring
pattern. When such an object literal is instead consumed as a real value -- the
base of a member access, call, computed access, or tagged template, e.g.
`( {... { a = 0 }. b = 1 } )` -- the pending CoverInitializedName error was
discarded by a later assignment, so no SyntaxError was raised and the
AssignmentPattern property value reached bytecode generation, hitting
RELEASE_ASSERT_NOT_REACHED in Node::generateExpressionByteCode.
Report the pending CoverInitializedName as an early SyntaxError in the two
LeftHandSideExpression member-access loops the moment the base is consumed as a
value, since it can no longer be refined into a pattern.
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
|
||
|---|---|---|
| .. | ||
| bin | ||
| cctest | ||
| kangax@07b25c46f1 | ||
| octane@30b1d8d714 | ||
| test262@3a182e9cda | ||
| vendortest@4c69299c40 | ||
| web-tooling-benchmark@4a12828c6a | ||