Fix parens for NewExpression

This commit is contained in:
Ron Buckton 2016-03-31 13:03:06 -07:00
parent 033864be82
commit 794e0cef8c

View File

@ -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;
}