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: simple catch parameters shouldn't block hoisting #33

Closed bakkot closed 7 years ago

bakkot commented 8 years ago

Consider

try {} catch(e) {
  {
    function e() {}
  }
}

From what I can tell, the function declaration should be hoisted. Currently it isn't. (Note that if you replace catch(e) with catch({e}), no hoisting is performed. This is a little bit horrifying.)