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

False positive unused_element hint #44268

Closed
davidmorgan opened this issue Nov 20, 2020 · 3 comments
Closed

False positive unused_element hint #44268

davidmorgan opened this issue Nov 20, 2020 · 3 comments
Assignees
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)

Comments

@davidmorgan
Copy link
Contributor

With dartanalyzer live internally and on the currently live dartpad:

class _Foo {
  factory _Foo([int x]) => _Foo._();
  
  _Foo._();
}

void main() {
  _Foo(3);
}

--> A value for optional parameter x isn't ever given.

@davidmorgan davidmorgan added the analyzer-warning Issues with the analyzer's Warning codes label Nov 20, 2020
@bwilkerson
Copy link
Member

@srawlins

@bwilkerson bwilkerson added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Nov 20, 2020
@srawlins
Copy link
Member

o_O Hrm... No bueno.

@srawlins srawlins self-assigned this Nov 21, 2020
@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Nov 21, 2020
@srawlins
Copy link
Member

dart-bot pushed a commit that referenced this issue Nov 22, 2020
…used

Fixes #44268

Change-Id: Ie0f3b004de2761145b7f8acffc3aa82b59a0aea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

No branches or pull requests

3 participants