Skip to content

Analyzer does not recognize doc comment references of extension methods via extension target #52275

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

Closed
srawlins opened this issue May 5, 2023 · 1 comment
Labels
devexp-ux legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@srawlins
Copy link
Member

srawlins commented May 5, 2023

Given this code:

class C {
  int x = 1;
}

extension E on C {
  int y = 1;
}

/// [C.x]. [C.y]. [E.y].
void f () {}

Analyzer recognizes the comment references for [C.x] and [E.y], but not for [C.y]. I think it should recognize all three.

One argument is that C.x would not be a legitimate reference (or call or access or whatever) of the instance method x, because C.x would have to be a static member reference (or constructor reference). But we make an affordance in doc comment references for C.x since the reference (almost) cannot be ambiguous between a static member and an instance member ("almost" because a class can have a constructor named x and an instance member named x simultaneously).

So, we should make the same affordance for [C.y].

@srawlins srawlins added legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request devexp-ux type-enhancement A request for a change that isn't a bug labels May 5, 2023
@srawlins
Copy link
Member Author

srawlins commented Jul 1, 2024

Oops there is a more recent duplicate with more discussion. #56109

@srawlins srawlins closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-ux legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant