Skip to content

Commit f6534fe

Browse files
committed
lint
1 parent 03a7baf commit f6534fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/checker/checker.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12401,10 +12401,10 @@ func (c *Checker) getSyntacticTruthySemantics(node *ast.Node) PredicateSemantics
1240112401

1240212402
func (c *Checker) checkNullishCoalesceOperands(left *ast.Node, right *ast.Node) {
1240312403
if ast.IsBinaryExpression(left.Parent.Parent) {
12404-
operatorToken := left.Parent.Parent.AsBinaryExpression().OperatorToken
12405-
left := left.Parent.Parent.AsBinaryExpression().Left
12406-
if ast.IsBinaryExpression(left) && operatorToken.Kind == ast.KindBarBarToken {
12407-
c.grammarErrorOnNode(left, diagnostics.X_0_and_1_operations_cannot_be_mixed_without_parentheses, scanner.TokenToString(ast.KindQuestionQuestionToken), scanner.TokenToString(operatorToken.Kind))
12404+
grandparentLeft := left.Parent.Parent.AsBinaryExpression().Left
12405+
grandparentOperatorToken := left.Parent.Parent.AsBinaryExpression().OperatorToken
12406+
if ast.IsBinaryExpression(grandparentLeft) && grandparentOperatorToken.Kind == ast.KindBarBarToken {
12407+
c.grammarErrorOnNode(grandparentLeft, diagnostics.X_0_and_1_operations_cannot_be_mixed_without_parentheses, scanner.TokenToString(ast.KindQuestionQuestionToken), scanner.TokenToString(grandparentOperatorToken.Kind))
1240812408
}
1240912409
} else if ast.IsBinaryExpression(left) {
1241012410
operatorToken := left.AsBinaryExpression().OperatorToken

0 commit comments

Comments
 (0)