-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Go to Imports with static declarations not working #59823
Comments
@bwilkerson should this command work only on the type name or on the static declaration too (thinking of dart-lang/language#3835 and #57036)? |
While I can see an argument for having the command work for any member in a declaration that might come from an extension, it seems odd to me for this command to work for anything other than top-level declarations because I can't see a use case for the functionality. What would prompt a user to want to know which |
Say I'm starting to work on a new project (monorepo) and I'm not familiar with its structure still. If I see something being used somewhere and I can't auto-import somewhere else, I'd like to know how that is on scope of that original file. Also, the current behaviour shows the import for an instance extension method so we might as well do the same then. If you agree I can open a new issue to track this specifically. If you disagree with the current behaviour for the extensions we can open another issue for removing this support. |
That sounds like a failure we should address, unless there's a case I'm not thinking of where it can't be addressed. |
I was thinking of something inside |
I suppose that makes sense. I'd still just go to the declaration and figure it out that way, but that doesn't mean it's the only valid way to figure out why you can't reference a member you know is defined. But I'd probably wait to add this feature until we know whether we will support static extension methods and if so exactly what the semantics are. |
Repro:
a.dart
main.dart
On
foo
parameter, I can use theGo to Imports
command, but not insidebar
.I'll work on this.
CC @DanTup
Edit
Continued work for #56584.
The text was updated successfully, but these errors were encountered: