Closed
Description
Example code that is incorrectly analyzed:
void main() {
String? test;
void t() {
test = null;
}
if (test != null) {
test += ''; // error test can be null
}
}
This is the same on all dart versions that support nnbd
I already read here that this might be by design but it is quite annoying and at least the error could be better (took me a while to figure out it was the local function that was breaking it).
Metadata
Metadata
Assignees
Labels
No labels