mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix parens for NewExpression
This commit is contained in:
1 parent
033864be82
commit
794e0cef8c
1 file changed
+3
-3
@@ -1336,9 +1336,9 @@ namespace ts {
|
||||
// NumericLiteral
|
||||
// 1.x -> not the same as (1).x
|
||||
//
|
||||
if (isLeftHandSideExpression(expression) &&
|
||||
expression.kind !== SyntaxKind.NewExpression &&
|
||||
expression.kind !== SyntaxKind.NumericLiteral) {
|
||||
if (isLeftHandSideExpression(expression)
|
||||
&& (expression.kind !== SyntaxKind.NewExpression || (<NewExpression>expression).arguments)
|
||||
&& expression.kind !== SyntaxKind.NumericLiteral) {
|
||||
return <LeftHandSideExpression>expression;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user