Closed
Bug 352786
Opened 18 years ago
Closed 17 years ago
Round-trip bracing change for "{ if(0) let x; }"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: testcase)
The entire if block is removed because the condition is always false, but the braces stick around for the phantom "let" declaration. js> function() { { if(0) let x; } } function () { { } } js> function () { { } } function () { }
Reporter | ||
Comment 1•18 years ago
|
||
Wait... the "let" shouldn't disappear entirely! Its scope (currently?) goes beyond the "if" so it needs to stick around. js> function( ){ if (false) let x } function () { }
Reporter | ||
Comment 2•17 years ago
|
||
Fixed by making let |not| directly inside a block be a syntax error (bug 408957).
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 3•17 years ago
|
||
/cvsroot/mozilla/js/tests/public-failures.txt new revision: 1.23; previous revision: 1.22 /cvsroot/mozilla/js/tests/js1_7/block/regress-352786.js initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•