diff --git a/lib/scope.js b/lib/scope.js index c7269347..5d0fb308 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -89,8 +89,12 @@ SymbolDef.prototype = { // https://github.com/mishoo/UglifyJS2/issues/1095 // prevent mangle name conflict while using `let` or `const` - if (this.orig[0] instanceof AST_SymbolBlockDeclaration) - s = s.parent_scope; + if (this.orig[0] instanceof AST_SymbolBlockDeclaration) { + var start = s.start; + if (start && start.type === 'keyword' && (start.value ==='default' || start.value === 'case')) { + s = s.parent_scope; + } + } this.mangled_name = s.next_mangled(options, this); if (this.global && cache) {