mwarrenus / js2-mode

Automatically exported from code.google.com/p/js2-mode
0 stars 0 forks source link

support https://developer.mozilla.org/en/New_in_JavaScript_1.7#let-scoped_variables_in_for_loops #116

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. configure js2-language-version to 180.
2. edit a function like this:

function letscope() {
    let k = 0;
    for (let i = 0; i < 10; i++) {
        k++;
    }
    for (let i = 0; i < 10; i++) {
        k++;
    }
}

3. check it for errors.

What is the expected output? What do you see instead?

expected: no errors (see link in subject line).
actual: at second "let i": TypeError: redeclaration of variable i.

What version of the product are you using? On what operating system?

js2-mode: 20090723b
emacs: 22

Please provide any additional information below.

Original issue reported on code.google.com by ric...@gmail.com on 26 Feb 2010 at 8:09