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

Can't go to the static method of a class #635

Closed
aengusjiang opened this issue Apr 14, 2017 · 11 comments
Closed

Can't go to the static method of a class #635

aengusjiang opened this issue Apr 14, 2017 · 11 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@aengusjiang
Copy link

We can't go to the definition when view a static method of a class, such as:

MainSrvProcessor::clientAskPVEEndReqProcessor;

we can't find the definition of clientAskPVEEndReqProcessor method by press key F12.

please help me to check this and fix it. thanks.

@sean-mcmanus
Copy link
Contributor

It works for me. Can you try class MainSrvProcessor { static void clientAskPVEEndReqProcessor () {} }; int main() { MainSrvProcessor::clientAskPVEEndReqProcessor (); }

Can you give more repro details? Are other methods of the class found? Does it find the wrong symbol? Maybe something else in the class definition is causing a failure. What OS are you on?

@sean-mcmanus sean-mcmanus added the more info needed The issue report is not actionable in its current state label Apr 14, 2017
@aengusjiang
Copy link
Author

Glad for yours response!

I just write a demo(See the attach):
test.tar.gz
My Os is Ubuntu17.04 and
vs code Version 1.11.2
cpptools Version 0.10.5

thank you.

@sean-mcmanus sean-mcmanus added bug and removed more info needed The issue report is not actionable in its current state labels Apr 17, 2017
@sean-mcmanus
Copy link
Contributor

Thanks for the repro -- namespace::class:: works but class:: alone doesn't.

@keweilizhe
Copy link

yes, i meet this too, can't goto class::my_struct. (^__^) ……

In Expectation your solution,

@aengusjiang
Copy link
Author

Haha , This issue is fixed in Vscode 1.16.0

@sean-mcmanus
Copy link
Contributor

The bug still exists when the IntelliSense engine is set to "Tag Parser". You probably are using the "Default" implementation, which doesn't have the bug. So the bug isn't really fixed, but using the Default intelliSense engine setting is recommended anyway.

@aengusjiang
Copy link
Author

Hello, sean-mcmanus
I can reproduce the bug again.
I do some change of the the test code above. It maybe can help you to fix this bug.
I guess it is caused by namespace.
see the attachement.
test_failed.zip
test_OK.zip

@sean-mcmanus
Copy link
Contributor

@AbelaroJiang The bug was never fixed for the Tag Parser. Are you using the "Default" IntelliSense engine (which shouldn't have this bug) or are you able to switch to using that? If you have #include files that aren't found in the translation unit it will fall back to the Tag Parser (if the intelliSenseFallback is enabled).

@aengusjiang
Copy link
Author

Yes, I use the default IntelliSense engine.
you can download the test sample the compare them.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Sep 15, 2017

Go to Definition is still implemented by the Tag Parser so the bug still existed. When you said it stopped reproing, I got this issue confused with another bug that stops reproing when switching to the Default IntelliSense. I've made a change that fixes this issue, but I'm not sure if it will make the next update or not. FYI, autocomplete and signatureHelp were also broken in this scenario (whenever code was only partially scoped, with some scopes missing on the left). Thanks a lot for reporting this issue. I'm sort of shocked that this scenario has been broken for so long.

@sean-mcmanus sean-mcmanus self-assigned this Sep 15, 2017
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Sep 15, 2017
@bobbrow
Copy link
Member

bobbrow commented Sep 26, 2017

This has been fixed in 0.13.0

@bobbrow bobbrow closed this as completed Sep 26, 2017
@sean-mcmanus sean-mcmanus removed their assignment Apr 22, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

4 participants