Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyser bug #35429

Closed
jfphilbin opened this issue Dec 17, 2018 · 1 comment
Closed

Analyser bug #35429

jfphilbin opened this issue Dec 17, 2018 · 1 comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@jfphilbin
Copy link

jfphilbin commented Dec 17, 2018

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.

@kevmoo kevmoo added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Dec 19, 2018
@ghost ghost deleted a comment from stereotype441 Dec 20, 2018
@ghost
Copy link

ghost commented Dec 20, 2018

This issue was moved by stereotype441 to dart-lang/linter#1321.

@ghost ghost closed this as completed Dec 20, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

2 participants