mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Fix parens for NewExpression
This commit is contained in:
parent
033864be82
commit
794e0cef8c
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user