mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(codegen): remove parens from new (import(''), function() {}) (#8707)
This commit is contained in:
parent
f15bdce53b
commit
0944758cc7
2 changed files with 2 additions and 1 deletions
|
|
@ -2069,7 +2069,7 @@ impl Gen for AssignmentTargetRest<'_> {
|
|||
impl GenExpr for SequenceExpression<'_> {
|
||||
fn gen_expr(&self, p: &mut Codegen, precedence: Precedence, ctx: Context) {
|
||||
p.wrap(precedence >= self.precedence(), |p| {
|
||||
p.print_expressions(&self.expressions, Precedence::Lowest, ctx);
|
||||
p.print_expressions(&self.expressions, Precedence::Lowest, ctx.and_forbid_call(false));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ fn expr() {
|
|||
test_minify("delete 2e308", "delete(1/0);");
|
||||
|
||||
test_minify_same(r#"({"http://a\r\" \n<'b:b@c\r\nd/e?f":{}});"#);
|
||||
test_minify_same("new(import(\"\"),function(){});");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Reference in a new issue