From 7f2a591c7ecdb13a20bbad5e7c614672dd890431 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 5 Jan 2018 19:36:02 +0800 Subject: warn on deprecated features (#2726) - `function.arguments` - `function.callers` fixes #2719 --- lib/compress.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index 3a3aac4f..e824d6ff 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -5461,6 +5461,14 @@ merge(Compressor.prototype, { }); OPT(AST_Dot, function(self, compressor){ + if (self.property == "arguments" || self.property == "caller") { + compressor.warn("Function.protoype.{prop} not supported [{file}:{line},{col}]", { + prop: self.property, + file: self.start.file, + line: self.start.line, + col: self.start.col + }); + } var def = self.resolve_defines(compressor); if (def) { return def.optimize(compressor); -- cgit v1.2.3