[analyzer] Convert to expression body refactoring with IIFE produces invalid programs. #51421
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
devexp-assist
Issues with analysis server assists
devexp-server
Issues related to some aspect of the analysis server
P4
type-enhancement
A request for a change that isn't a bug
Consider the following:
If we use the 'Convert to expression body' refactoring to convert the body of the function literal into an expression body, we will end up with an invalid program:
I think that we should probably remove the function invocation and the surrounding function expression if this refactoring is invoked on an IIFE containing a single return statement:
The text was updated successfully, but these errors were encountered: