File tree 1 file changed +5
-6
lines changed 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1646,9 +1646,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
1646
1646
function parenthesizeForAccess ( expr : Expression ) : LeftHandSideExpression {
1647
1647
// When diagnosing whether the expression needs parentheses, the decision should be based
1648
1648
// on the innermost expression in a chain of nested type assertions.
1649
- let innerExpression = expr ;
1650
- while ( innerExpression . kind === SyntaxKind . TypeAssertionExpression ) {
1651
- innerExpression = ( < TypeAssertion > innerExpression ) . expression ;
1649
+ while ( expr . kind === SyntaxKind . TypeAssertionExpression ) {
1650
+ expr = ( < TypeAssertion > expr ) . expression ;
1652
1651
}
1653
1652
1654
1653
// isLeftHandSideExpression is almost the correct criterion for when it is not necessary
@@ -1659,9 +1658,9 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
1659
1658
// NumberLiteral
1660
1659
// 1.x -> not the same as (1).x
1661
1660
//
1662
- if ( isLeftHandSideExpression ( innerExpression ) &&
1663
- innerExpression . kind !== SyntaxKind . NewExpression &&
1664
- innerExpression . kind !== SyntaxKind . NumericLiteral ) {
1661
+ if ( isLeftHandSideExpression ( expr ) &&
1662
+ expr . kind !== SyntaxKind . NewExpression &&
1663
+ expr . kind !== SyntaxKind . NumericLiteral ) {
1665
1664
1666
1665
return < LeftHandSideExpression > expr ;
1667
1666
}
You can’t perform that action at this time.
0 commit comments