-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverdevexp-uxtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
If you have a code like the following:
class Class {
int myField = 0;
}
void foo() {
var instance = Class();
if (instance case Class(:var myField)) {
print(myField);
print(myField);
}
}Using "Go to Definition" or CTRL + Click on myField at line 7 (inside if), it doesn't go to the definition in the class. Since it is also a variable definition itself, it doesn't think there is anything more to it.
By default, VS Code has a fallback at a definition (if you call that command again at that location) to show references, so it would show a list containing lines 8 and 9.
I'd like a way of getting back to the class definition for myField. In this case, this means that "Go to Definition" would take us to the definition and not "do nothing" to fall back to VS Code default.
mateusfccp, Wdestroier and FMorschel
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-serverIssues related to some aspect of the analysis serverIssues related to some aspect of the analysis serverdevexp-uxtype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug