Summary: | JSC allows invalid var declarations when the declared name is the same as a let/const variable | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> | ||||
Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | basile_clement, benjamin, fpizlo, ggaren, mark.lam, mmirman, msaboff, oliver, ysuzuki | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Saam Barati
2015-08-03 16:47:17 PDT
Created attachment 261842 [details]
patch
Comment on attachment 261842 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=261842&action=review r=me > LayoutTests/js/script-tests/let-syntax.js:70 > +shouldNotHaveSyntaxError("function foo() { { let x; } var x; }"); Nice! > LayoutTests/js/script-tests/let-syntax.js:105 > +shouldHaveSyntaxError("let x; var [x] = 20;"); I suggest adding `var x; let x;` cases because this issue depended on the occurrence order. landed in: http://trac.webkit.org/changeset/190188 |