Open
Bug 392063
Opened 18 years ago
Updated 3 years ago
Better error message for non-lhs in |var| destructuring
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: Waldo, Unassigned)
References
(Blocks 1 open bug)
Details
js> var c = {};
js> var {m: c.f} = {m: 2};
typein:2: SyntaxError: missing variable name:
typein:2: var {m: c.f} = {m: 2};
typein:2: ........^
The |var| at the front forces all assignees in the pattern to be identifiers (without the var and with some parens, the above works), but the error message doesn't make that particularly clear.
| Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•