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

Analyzer false positive for unused call extension member. #47041

Closed
lrhn opened this issue Aug 30, 2021 · 3 comments
Closed

Analyzer false positive for unused call extension member. #47041

lrhn opened this issue Aug 30, 2021 · 3 comments
Assignees
Labels
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

@lrhn
Copy link
Member

lrhn commented Aug 30, 2021

Example:

extension on Type {
  int call<T>() => 2;
}

void main() {
  print((int)<int>());
}

This code gives a warning about the call method not being used, even though it is.

@lrhn lrhn added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Aug 30, 2021
@jcollins-g jcollins-g added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Aug 30, 2021
@jcollins-g
Copy link
Contributor

marked P1 for incorrect analysis warning on edge case without workaround (besides "don't have a call extension method").

@jcollins-g jcollins-g added P2 A bug or feature request we're likely to work on and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels Aug 31, 2021
@jcollins-g
Copy link
Contributor

this does have a workaround; disabling the warning.

@scheglov scheglov self-assigned this Sep 8, 2021
@scheglov
Copy link
Contributor

scheglov commented Sep 8, 2021

@scheglov scheglov closed this as completed Sep 8, 2021
dart-bot pushed a commit that referenced this issue Sep 8, 2021
…xtension.

Bug: #47041
Change-Id: Ib37c03ad7350c489f6ee0673000705bdc3f1d01c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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. 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