Closed
Description
This is a not-uncommon combination!
omit_local_variable_types
should apply when the type can be inferred from an assignment – which is most of the time.
But in the case below, it cannot be inferred – so the type should be provided!
int bob() {
int thing;
if (true) {
thing = 1;
} else {
thing = 2;
}
return thing;
}
RE #58111
Came from dart-archive/linter@a5b1a8b
Just started seeing this warning in the SDK as of 7eaafa0