-
Couldn't load subscription status.
- Fork 45
Closed
Labels
bugSomething isn't working as expectedSomething isn't working as expected
Description
Description
Linter will remove function calls when made to a unused variable, even though the function itself might still be needed.
Steps To Reproduce
- Create a variable that receives the result of a function but is unused
- Accept the quickfix
Expected Behavior
Future _postSomething(var something) {
final result = sendPostRequest(something);
}
Now since I didn't do anything with the result, it will cause a unused_local_variable linter
And when I select the "Remove unused local variable" quickfix it will delete the whole send, not just the variable.
Wanted result:
Future _postSomething(var something) {
sendPostRequest(something);
}
Actual result:
Future _postSomething(var something) {
}
Additional Context
The linter deleted some of my app functionality instead of just the variable.
alestiago
Metadata
Metadata
Assignees
Labels
bugSomething isn't working as expectedSomething isn't working as expected
Type
Projects
Status
Done