Stop working around dart-lang/linter#4381 (#2071)

This commit is contained in:
Natalie Weizenbaum 2023-08-21 16:47:18 -07:00 committed by GitHub
parent 8f0eca33e2
commit 58cbab42e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,10 +82,7 @@ final class BinaryOperationExpression implements Expression {
var right = this.right; // Hack to make analysis work. var right = this.right; // Hack to make analysis work.
var rightNeedsParens = switch (right) { var rightNeedsParens = switch (right) {
BinaryOperationExpression(:var operator) => BinaryOperationExpression(:var operator) =>
// dart-lang/linter#4381
// ignore: unnecessary_this
operator.precedence <= this.operator.precedence && operator.precedence <= this.operator.precedence &&
// ignore: unnecessary_this
!(operator == this.operator && operator.isAssociative), !(operator == this.operator && operator.isAssociative),
ListExpression(hasBrackets: false, contents: [_, _, ...]) => true, ListExpression(hasBrackets: false, contents: [_, _, ...]) => true,
_ => false _ => false