Closed
Description
@jfphilbin commented on Dec 17, 2018, 9:54 AM UTC:
In Dart SDK Version2.2.0-dev.1.1 on Windows 10, the following code:
void main() {
foo('****', 0, 5);
}
int foo(int start, int end, [int x = 0]) {
var s = 0, index = start;
if ((index += 2) < end) {
if ((index += 2) < end) { // Info here
if (x == null) s = 1;
}
}
return s;
}
Generates the following Analyzer Info:
info: Conditions should not unconditionally evaluate to `true` or to `false`. verify: (index += 2) < end.
(invariant_booleans at [core] bin\bug.dart:15)
Which I think is incorrect.
This issue was moved by stereotype441 from dart-lang/sdk#35429.