escope icon indicating copy to clipboard operation
escope copied to clipboard

let declaration treated as var declaration

Open adiba opened this issue 8 years ago • 1 comments

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

adiba avatar May 16 '17 06:05 adiba

See also:

  • https://github.com/estools/escope/issues/33
  • https://github.com/estools/escope/issues/57

0xdevalias avatar Nov 16 '23 06:11 0xdevalias