[Webkit-unassigned] [Bug 157974] New: [JSC] incorrectly reports SyntaxError when destructuring `let`
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 21 14:01:56 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=157974
Bug ID: 157974
Summary: [JSC] incorrectly reports SyntaxError when
destructuring `let`
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: caitp at igalia.com
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 :)
--
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/20160521/28d0b52f/attachment-0001.html>
More information about the webkit-unassigned
mailing list