join_return_with_assignment false positive #57915
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
devexp-linter
Issues with the analyzer's support for the linter package
linter-false-positive
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Describe the issue
join_return_with_assignment reports an error for some cases where the assigned variable is used inside of the same assignment block (generally in a lambda).
To Reproduce
Here is a somewhat contrived example but similar to the case I ran into:
Expected behavior
The lint would not warn about this code since controller is used after assignment (although its admittedly a bit difficult to tell here).
The text was updated successfully, but these errors were encountered: