escope
escope copied to clipboard
let declaration treated as var declaration
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: https://github.com/estools/escope/issues/57
See also:
- https://github.com/estools/escope/issues/33
- https://github.com/estools/escope/issues/57