Closed Bug 376410 Opened 17 years ago Closed 17 years ago

Decompilation adds braces for labeled statement in loop, changing scope of "let"

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase)

js> f = function() { while(0) L: let x; print(x); }
function () {
    while (0) {
    L:
        let x;
    }
    print(x);
}

js> f()
undefined

js> (eval(""+f))()
typein:9: ReferenceError: x is not defined
Depends on: 408957
Fixed by making let |not| directly inside a block be a syntax error (bug 408957).
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
/cvsroot/mozilla/js/tests/public-failures.txt
new revision: 1.21; previous revision: 1.20

/cvsroot/mozilla/js/tests/js1_7/block/regress-376410.js
initial revision: 1.1
Flags: in-testsuite+
Flags: in-litmus-
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.