|| this.undeclared
|| !options.eval && this.scope.pinned()
|| options.keep_fnames
- && (this.orig[0] instanceof AST_SymbolLambda
- || this.orig[0] instanceof AST_SymbolDefun);
+ && (this.orig[0] instanceof AST_SymbolClass
+ || this.orig[0] instanceof AST_SymbolDefClass
+ || this.orig[0] instanceof AST_SymbolDefun
+ || this.orig[0] instanceof AST_SymbolLambda);
},
};
node_version: ">=4"
}
+keep_fnames: {
+ options = {
+ keep_fnames: true,
+ toplevel: true,
+ }
+ mangle = {
+ keep_fnames: true,
+ toplevel: true,
+ }
+ input: {
+ "use strict";
+ class Foo {}
+ console.log(Foo.name, class Bar {}.name);
+ }
+ expect: {
+ "use strict";
+ class Foo {}
+ console.log(Foo.name, class Bar {}.name);
+ }
+}
+
issue_805_1: {
options = {
inline: true,