Skip to content

Fix #8162 and #8173: Add root symbols to search in find all referecnes#8210

Merged
mhegazy merged 1 commit into
masterfrom
Fix8162
Apr 20, 2016
Merged

Fix #8162 and #8173: Add root symbols to search in find all referecnes#8210
mhegazy merged 1 commit into
masterfrom
Fix8162

Conversation

@mhegazy
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy commented Apr 20, 2016

This is a regression caused by the polymorphic this type, since all classes are now generic. Make sure to include the target symbols of any symbols we get to the search.

Fixes #8162
Fixes #8173

Comment thread src/services/services.ts
const propertySymbol = typeChecker.getPropertyOfType(type, propertyName);
if (propertySymbol) {
result.push(propertySymbol);
result.push(...typeChecker.getRootSymbols(propertySymbol));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were avoiding this pattern because there can often be many elements in the list - though I guess in practice this probably doesn't come up all that often.

@DanielRosenwasser
Copy link
Copy Markdown
Member

So this was a regression that we knew was there when we added this types, but didn't follow up on with an issue? We need to be more careful in the future.

👍

@mhegazy
Copy link
Copy Markdown
Contributor Author

mhegazy commented Apr 20, 2016

So this was a regression that we knew was there when we added this types, but didn't follow up on with an issue?

No. i do not think we knew about it.

@mhegazy mhegazy merged commit d0cfe43 into master Apr 20, 2016
@mhegazy mhegazy deleted the Fix8162 branch April 20, 2016 16:27
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants