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

Hide @nonVirtual methods in autocomplete? #55628

Closed
goderbauer opened this issue May 2, 2024 · 2 comments
Closed

Hide @nonVirtual methods in autocomplete? #55628

goderbauer opened this issue May 2, 2024 · 2 comments
Assignees
Labels
analyzer-completion Issues with the analysis server's code completion feature 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-enhancement A request for a change that isn't a bug

Comments

@goderbauer
Copy link
Contributor

When a method is marked @nonVirtual it should not be overridden. Yet, my IDE suggests it as an overridable method (see below) and as soon as I accept that suggestion, the analyzer complains that I should not be overriding this method (invalid_override_of_non_virtual_member). Should @nonVirtual methods just be excluded from the suggestion list of overridable methods?

Screenshot 2024-05-02 at 1 07 33 PM
@goderbauer
Copy link
Contributor Author

cc @bwilkerson as I assume these suggestions are powered by the analyzer?

I ran into this working on the @Stateful macro while looking for ways to stop the "fake" superclass methods (that are only there to satisfy the type system hack) from messing up people's autocomplete.

@bwilkerson
Copy link
Member

Yes, these suggestions come from the analysis server, and yes, we should exclude non-virtual methods.

@bwilkerson bwilkerson added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-completion Issues with the analysis server's code completion feature P2 A bug or feature request we're likely to work on labels May 2, 2024
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label May 10, 2024
@keertip keertip self-assigned this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-completion Issues with the analysis server's code completion feature 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-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants