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

Go to definition of struct opens typedef from other file instead of immediate declaration #4135

Closed
Zylann opened this issue Aug 24, 2019 · 3 comments
Labels
bug Feature: Go to Definition An issue related to Go to Definition/Declaration. fixed (release pending) Language Service quick fix Works in VS So we'd need to fix it for VS Code to reach parity.
Milestone

Comments

@Zylann
Copy link

Zylann commented Aug 24, 2019

Type: LanguageService

Windows 10 64 bits
VSCode version: 1.37.1 (user setup)

I have two files in a freshly created folder:

alpaca.h

template <typename T>
class Alpaca {
public:
	struct Test {
	};

	void foo(Test a) {
	}
};

cat.h

#include "alpaca.h"

class Cat {
	typedef Alpaca<int> A;
	typedef A::Test Test;
};

When I open alpaca.h, and use Go to definition on the occurrence of Test in the foo function, it opens cat.h and shows me the typedefed Test. While this is indirectly correct, I would have expected intellisense to point me the direct declaration of Test, just above foo.

If there are more than one typedef defined in the same manner, it even opens a peek list of them, but still not the wanted one.

@sean-mcmanus sean-mcmanus added bug Feature: Go to Definition An issue related to Go to Definition/Declaration. Language Service Works in VS So we'd need to fix it for VS Code to reach parity. labels Aug 24, 2019
@sean-mcmanus
Copy link
Collaborator

I've verified the bug. It doesn't repro with VS.

@sean-mcmanus
Copy link
Collaborator

Thanks for reporting this. It should be fixed in our 0.25.1 bug fix update for next week -- unless it gets "cut" for some reason.

@sean-mcmanus
Copy link
Collaborator

Fixed with 0.25.1.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Go to Definition An issue related to Go to Definition/Declaration. fixed (release pending) Language Service quick fix Works in VS So we'd need to fix it for VS Code to reach parity.
Projects
None yet
Development

No branches or pull requests

2 participants