WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
157974
[JSC] incorrectly reports SyntaxError when destructuring `let`
https://bugs.webkit.org/show_bug.cgi?id=157974
Summary
[JSC] incorrectly reports SyntaxError when destructuring `let`
Caitlin Potter (:caitp)
Reported
2016-05-21 14:01:56 PDT
Right now, the parser eagerly reports an error when parsing an ObjectPattern (with DestructuringKind::DestructureToLet), as soon as it encounters the identifier "let" is encountered, without knowing if "let" is the intended destructuring target / binding identifier or not. Example code: ``` let {let: a} = {let: 1 } ``` This should declare a lexical variable `a` initialized to `1`, but instead reports a SyntaxError. It's just a case of reporting the error a bit too early, before it's known whether it's the binding target or not. Easy fix, good first bug :)
Attachments
Add attachment
proposed patch, testcase, etc.
serakeri
Comment 1
2024-08-14 14:53:33 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/32212
EWS
Comment 2
2024-09-05 10:13:06 PDT
Committed
283217@main
(dbcb33d932fc): <
https://commits.webkit.org/283217@main
> Reviewed commits have been landed. Closing PR #32212 and removing active labels.
Radar WebKit Bug Importer
Comment 3
2024-09-05 10:14:14 PDT
<
rdar://problem/135353378
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug