Inaccurate unnecessary_await_in_return #58001
Labels
devexp-linter
Issues with the analyzer's support for the linter package
legacy-area-analyzer
Use area-devexp instead.
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Describe the issue
Linter shows unnecessary_await_in_return if in an expression body, but not when the statement is a block body.
To Reproduce
No issue here, but when converted to an expression body, it shows a warning.
Expected behavior
if it's a simple refactor, then it shouldn't change the correctness of the statement. We should either not offer the refactor, or not show a warning here. I know the fat arrow is short for return, but that's not always desirable nor correct, especially when using void functions.
The text was updated successfully, but these errors were encountered: