fix(es/minifier): Remove wrong code (#5485)

This commit is contained in:
Donny/강동윤 2022-08-14 15:15:03 +09:00 committed by GitHub
parent bcc67c39b0
commit 2045fe6273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -0,0 +1,10 @@
const a = true;
const b = true;
const c = false;
if (a && b && c) {
console.log('This shouldn\'t log');
}
if (c && b && a) {
console.log('Reversed: This also shouldn\'t log');
}
console.log('PASS')

View File

@ -326,11 +326,6 @@ where
report_change!("Optimizing: e && true => !!e");
self.negate_twice(&mut bin.left, false);
*e = *bin.left.take();
} else {
self.changed = true;
report_change!("Optimizing: e && false => e");
*e = *bin.left.take();
}
}

View File

@ -46,4 +46,4 @@ tracing = "0.1.32"
[dev-dependencies]
pretty_assertions = "1.1"
testing = { path = "../testing" }
testing = { version = "0.29.4", path = "../testing" }