076dd1a2c0
Fixes https://github.com/dart-lang/linter/issues/3814 This CL ends up solving a few problems, all rooted to one issue: binary expressions were considered as they live in the syntax tree, but as they are read by a human, they can be longer chains of additions. 1. We reported `'' + '' + ''` even though adding two string literals is considered OK. This is because the outer binary expression has `'' + ''` as its left operand, which isn't technically a string literal. This over-reporting is corrected. 2. Binary expressions inside string interpolations were not considered. This corrects that. 3. We can now report correctly the two issues in code like `x + '' + '' + x`. Change-Id: If2a6fdf11d815d42d732cf2713b9e6dea3932e3d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385320 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>