Incorrect warning: invariant_booleans #58293
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
I have an unusual algorithm I'm working on. I tried to create a smaller reproduction example for this ticket. This code is useless, but it does demonstrate the analyzer issue:
Warning:
The first time the
while
loop is executed, we can know through static analysis thatk < a.length
because this condition was just checked on the previous line. However, on the next iteration of thewhile
loop,k < a.length
may or may not betrue
.The text was updated successfully, but these errors were encountered: