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

Deprecated uses are reported in a few positions inside deprecated declarations #51664

Closed
4 of 5 tasks
srawlins opened this issue Mar 8, 2023 · 0 comments
Closed
4 of 5 tasks
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. P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@srawlins
Copy link
Member

srawlins commented Mar 8, 2023

A use of a @deprecated element is not supposed to be reported when the use site is itself "inside" a declaration of a deprecated element. For example, given a deprecated class C, and a deprecated class D which extends C, no deprecated_member_use warnings is reported at the identifier C in D extends C. This mechanism supports the ability to bulk deprecate a set of APIs or elements without many noisy deprecation warnings within the set.

However, this mechanism has a few holes:

  • Referencing a deprecated element inside a deprecated enum is still reported.
  • Referencing a deprecated element inside a deprecated extension is still reported.
  • Referencing a deprecated element inside a deprecated class type alias (mixin application) is still reported.
  • Referencing a deprecated element inside a deprecated typedef (both the old and the new syntax) is still reported.
  • Referencing a deprecated element inside a deprecated parameter (simple formal, default formal, field formal, super formal, function-typed formal) is still reported.
@srawlins srawlins added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request analyzer-warning Issues with the analyzer's Warning codes type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Mar 8, 2023
@srawlins srawlins self-assigned this Mar 9, 2023
copybara-service bot pushed a commit that referenced this issue Mar 15, 2023
Bug: #51664
Change-Id: I65847a704e8a1dc17b47f2783d009669c703b1e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287674
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>
copybara-service bot pushed a commit that referenced this issue Mar 28, 2023
…e aliases

Bug: #51664
Change-Id: I949f82bd9785e2738e88d11426e5adff2780b051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291580
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>
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. P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

1 participant