Open
Description
Consider the following:
void main() {
final a = () {
return 0;
}();
}
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:
void main() {
final a = () => 0();
}
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:
void main() {
final a = 0;
}