File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,6 @@ namespace ts {
8181 const binaryOperatorPrecedence = getOperatorPrecedence ( SyntaxKind . BinaryExpression , binaryOperator ) ;
8282 const binaryOperatorAssociativity = getOperatorAssociativity ( SyntaxKind . BinaryExpression , binaryOperator ) ;
8383 const emittedOperand = skipPartiallyEmittedExpressions ( operand ) ;
84- // If a privateIdentifier is on the left side, this is not a real expression and
85- // should not become parenthesized
86- if ( isLeftSideOfBinary && isPrivateIdentifier ( operand ) ) {
87- return false ;
88- }
8984 if ( ! isLeftSideOfBinary && operand . kind === SyntaxKind . ArrowFunction && binaryOperatorPrecedence > OperatorPrecedence . Assignment ) {
9085 // We need to parenthesize arrow functions on the right side to avoid it being
9186 // parsed as parenthesized expression: `a && (() => {})`
Original file line number Diff line number Diff line change @@ -3706,6 +3706,7 @@ namespace ts {
37063706 case SyntaxKind . ThisKeyword :
37073707 case SyntaxKind . SuperKeyword :
37083708 case SyntaxKind . Identifier :
3709+ case SyntaxKind . PrivateIdentifier :
37093710 case SyntaxKind . NullKeyword :
37103711 case SyntaxKind . TrueKeyword :
37113712 case SyntaxKind . FalseKeyword :
You can’t perform that action at this time.
0 commit comments