Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let declaration treated as var declaration #119

Open
adiba opened this issue May 16, 2017 · 1 comment
Open

let declaration treated as var declaration #119

adiba opened this issue May 16, 2017 · 1 comment

Comments

@adiba
Copy link

adiba commented May 16, 2017

This should throw an error on execute if a is not defined outside the blocks.

{
    let a;
}
{
    a++;
}

However, escope treats both as as the same variable.
Tested with http://esprima.org/demo/rename.html

Related: #57

@adiba adiba changed the title let declaration treated like var declaration let declaration treated as var declaration May 16, 2017
@0xdevalias
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants