beautify correction

This commit is contained in:
Jean-Louis GUENEGO 2017-09-23 15:34:45 +02:00
parent 7d3dcc0bbd
commit 1076fe1e6c
2 changed files with 6 additions and 5 deletions

View File

@ -546,10 +546,7 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options){
var mangle_with_block_scope =
(!options.ie8 && node instanceof AST_SymbolCatch) ||
node instanceof AST_SymbolBlockDeclaration;
if (options.reserved.indexOf(node.name) >= 0) {
mangle_with_block_scope = false;
}
if (mangle_with_block_scope) {
if (mangle_with_block_scope && options.reserved.indexOf(node.name) < 0) {
to_mangle.push(node.definition());
return;
}

View File

@ -819,6 +819,10 @@ class_name_can_be_preserved_with_reserved: {
}
}
expect: {
function x(){class Foo{}Foo.bar;class s{}s.foo}
function x(){
class Foo{}
Foo.bar;
class s{}s.foo
}
}
}