-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
When changing a variable with unary operators, the analyser don't seem to invalidate its
assumptions - and produces false warnings.
Example, both inner conditionals in this function give bogus warnings:
void test() {
int b = 2;
if (b > 0) {
b--;
if (b == 0) {
return;
}
if (b > 0) {
return;
}
}
}
Funny enough, the warning would be appropriate for the outer conditional.
Dart SDK version: 1.22.1
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondevexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)