fix code generator for this case:
if (foo) {
with (bar)
if (baz)
x();
} else y();
(the compressor removes the brackets since the consequent consists of a
single statement, but the codegen must include the brackets because
otherwise the `else` would refer to the inner `if`)
This commit is contained in:
@@ -611,10 +611,7 @@ function OutputStream(options) {
|
||||
}
|
||||
b = b.alternative;
|
||||
}
|
||||
else if (b instanceof AST_While
|
||||
|| b instanceof AST_Do
|
||||
|| b instanceof AST_For
|
||||
|| b instanceof AST_ForIn) {
|
||||
else if (b instanceof AST_StatementWithBody) {
|
||||
b = b.body;
|
||||
}
|
||||
else break;
|
||||
|
||||
Reference in New Issue
Block a user