Skip to content

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

Merged
Mohamed Hegazy (mhegazy) merged 1 commit into
masterfrom
Fix8162
Apr 20, 2016
Merged

Mohamed Hegazy (mhegazy) merged 1 commit into
masterfrom
Fix8162

Conversation

@mhegazy

Copy link
Copy Markdown
Contributor

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

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.

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