minor
This commit is contained in:
@@ -20,7 +20,7 @@ keep_some_blocks: {
|
||||
// 1.
|
||||
if (foo) {
|
||||
{{{}}}
|
||||
if (bar) baz();
|
||||
if (bar) { baz(); }
|
||||
{{}}
|
||||
} else {
|
||||
stuff();
|
||||
|
||||
@@ -33,11 +33,17 @@ dead_code_2_should_warn: {
|
||||
x = 10;
|
||||
throw "foo";
|
||||
// completely discarding the `if` would introduce some
|
||||
// bugs. UglifyJS v1 doesn't deal with this issue.
|
||||
// bugs. UglifyJS v1 doesn't deal with this issue; in v2
|
||||
// we copy any declarations to the upper scope.
|
||||
if (x) {
|
||||
y();
|
||||
var x;
|
||||
function g(){};
|
||||
// but nested declarations should not be kept.
|
||||
(function(){
|
||||
var q;
|
||||
function y(){};
|
||||
})();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ function log() {
|
||||
}
|
||||
|
||||
function log_directory(dir) {
|
||||
log("--- Entering [{dir}]", { dir: dir });
|
||||
log("*** Entering [{dir}]", { dir: dir });
|
||||
}
|
||||
|
||||
function log_start_file(file) {
|
||||
log("*** {file}", { file: file });
|
||||
log("--- {file}", { file: file });
|
||||
}
|
||||
|
||||
function log_test(name) {
|
||||
|
||||
Reference in New Issue
Block a user