Fix parens for AST_New

Close #114
This commit is contained in:
Mihai Bazon
2013-02-06 11:28:49 +02:00
parent 9e8ba27dcd
commit 3c8a0bdff4

View File

@@ -509,7 +509,7 @@ function OutputStream(options) {
PARENS(AST_New, function(output){
var p = output.parent();
if (no_constructor_parens(this, output)
&& (p instanceof AST_Dot // (new Date).getTime()
&& (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]()
|| p instanceof AST_Call && p.expression === this)) // (new foo)(bar)
return true;
});