aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index d42f84d1..e47be97b 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -801,7 +801,9 @@ merge(Compressor.prototype, {
};
function extract_declarations_from_unreachable_code(compressor, stat, target) {
- compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start);
+ if (!(stat instanceof AST_Defun)) {
+ compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start);
+ }
stat.walk(new TreeWalker(function(node){
if (node instanceof AST_Definitions) {
compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start);