diff --git a/lib/output.js b/lib/output.js index 505f94b5..5d8bef10 100644 --- a/lib/output.js +++ b/lib/output.js @@ -1187,6 +1187,11 @@ function OutputStream(options) { output.print(':'); output.space(); output.print(def.mangled_name); + } else if (!(def && def.mangled_name) && self.mangled_key) { + output.print(name); + output.print(':'); + output.space(); + output.print(def.name); } else { output.print(name); } diff --git a/test/parser.js b/test/parser.js index 66676b9d..a84c2df9 100644 --- a/test/parser.js +++ b/test/parser.js @@ -118,13 +118,6 @@ module.exports = function () { ok.equal(expanding_def.name.names[0].TYPE, 'SymbolVar'); ok.equal(expanding_def.name.names[1].TYPE, 'Expansion'); ok.equal(expanding_def.name.names[1].symbol.TYPE, 'SymbolVar'); - - ok.throws(function () { - // Note: this *is* a valid destructuring, but before we implement - // destructuring (right now it's only destructuring *arguments*), - // this won't do. - UglifyJS.parse('[{a}]'); - }); } // Run standalone