JS: transfer all empty statement simplifications RedundantLabelRemoval to EmptyStatementElimination, so that empty statements can be eliminated everywhere, not in labeled blocks only.
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
function box() {
|
||||
{}
|
||||
{
|
||||
{}
|
||||
{}
|
||||
}
|
||||
|
||||
var $x = "OK";
|
||||
if ($x == "123") {}
|
||||
else if ($x == "234") {} else {}
|
||||
if ($x == "qwe") {}
|
||||
|
||||
switch ($x) {
|
||||
case 1:
|
||||
case 2:
|
||||
default:
|
||||
}
|
||||
|
||||
return $x;
|
||||
}
|
||||
Reference in New Issue
Block a user