mishoo/UglifyJS — Issue #267: Name mangling breaks with named functions
Author: gbradley
Created: 2011-12-06 16:40:52+00:00
State: open

While the `name` property of a Function is non-standard, this shouldn't break:

var x = function Bar(){
console.log(this.constructor.name); => 'Bar'
};
var baz = new x();

but gets uglified to

var x=function a(){
console.log(this.constructor.name) => 'a'
};
var baz=new x

Looks like several issues are similar to this, but they're all closed.