Skip to content

Commit 794e0ce

Browse files
committed
Fix parens for NewExpression
1 parent 033864b commit 794e0ce

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/compiler/factory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,9 +1336,9 @@ namespace ts {
13361336
// NumericLiteral
13371337
// 1.x -> not the same as (1).x
13381338
//
1339-
if (isLeftHandSideExpression(expression) &&
1340-
expression.kind !== SyntaxKind.NewExpression &&
1341-
expression.kind !== SyntaxKind.NumericLiteral) {
1339+
if (isLeftHandSideExpression(expression)
1340+
&& (expression.kind !== SyntaxKind.NewExpression || (<NewExpression>expression).arguments)
1341+
&& expression.kind !== SyntaxKind.NumericLiteral) {
13421342
return <LeftHandSideExpression>expression;
13431343
}
13441344

0 commit comments

Comments
 (0)