test that names used in destructurings don't get hoisted

This commit is contained in:
Fábio Santos
2015-01-15 13:27:30 +00:00
committed by Richard van Velzen
parent 4644becb9b
commit 96b89e34a3
2 changed files with 67 additions and 1 deletions

View File

@@ -1280,7 +1280,6 @@ merge(Compressor.prototype, {
// collect only vars which don't show up in self's arguments list
var defs = [];
vars.each(function(def, name){
// TODO test this too
if (self instanceof AST_Lambda
&& find_if(function(x){ return x.name == def.name.name },
self.args_as_names())) {