shapesecurity / shift-scope-js

scope analyser for the Shift AST
http://shift-ast.org/scope.html
Apache License 2.0
11 stars 6 forks source link

B.3.3 function declarations are not marked as reading/writing their variables #55

Open bakkot opened 7 years ago

bakkot commented 7 years ago

For example, in

{
  function f(){}
}

the function does four things from the perspective of scope analysis: declares a global-scoped variable f, declares a block-scoped variable f, reads from the block-scoped variable, and writes to the global-scoped variable.

The scope analyzer misses the latter two.