Open
Description
The following code:
int foo(int? arg) {
arg = 0;
while (true) {
while (true) {
arg++;
}
}
}
produces this error:
error • The method '+' can't be unconditionally invoked because the receiver can be 'null'. • test.dart:5:7 • unchecked_use_of_nullable_value
Despite the fact that arg
is always provably non-null by the point the ++
happens.