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

add tests for block-scoped declarations in catch #3

Closed michaelficarra closed 9 years ago

michaelficarra commented 9 years ago

I believe we already support this properly, but it needs tests.

try { throw 0; } catch (e) { e; } // 1 scope
try { throw 0; } catch (e) { let a; e } // 2 scopes
try { throw 0; } catch (e) { let e; e; } // 2 scopes, with shadowing