Analyzer incorrectly issues "unused" warning on variables being used by ??= #27705
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
The following has an unused warning on the variable _a:
import 'dart:async';
class A {
var _a;
void doSomething() {
_a ??= new Future(() => _a = null);
}
}
However, _a is used with ??= so that we don't create multiple futures doing the same work.
The text was updated successfully, but these errors were encountered: