You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find references on overloaded/abstract class method #8173
It would be nice for "Find references" to also report usages of the overloads / implementations of the base method.
Example:
abstractclassBase{abstractsomeMethod(): void;// <-- find references here should also find MyClass#someMethod}classMyClassextendsBase{someMethod(){alert('test");
}}
EDIT: This is also a problem with refactoring (method rename) since it would rename the base class method, but not the overrides in the child classes.
Thanks for reporting this. Unfortunately, the code here isn't enough to reproduce the issue you're describing -- the rename and find references successfully find someMethod in both classes regardless of which one I start at.
Can you reduce this down to an isolated block that shows the bug? Either a sample that clearly shows the problem in the TypeScript Playground would be great.
Somehow I assumed this feature wasn't implemented at all and I didn't bother to test my example. It looks like it only happens when generics are involved. See the modified example below:
abstractclassBase<T>{abstractsomeMethod(): T;// <-- find references here should also find MyClass#someMethod}classMyClass<T>extendsBase<T>{someMethod(): T{alert('test');return;// funnily, this is also allowed without an explicit cast}}
Activity
RyanCavanaugh commentedon Apr 19, 2016
Thanks for reporting this. Unfortunately, the code here isn't enough to reproduce the issue you're describing -- the rename and find references successfully find
someMethodin both classes regardless of which one I start at.Can you reduce this down to an isolated block that shows the bug? Either a sample that clearly shows the problem in the TypeScript Playground would be great.
use-strict commentedon Apr 19, 2016
Somehow I assumed this feature wasn't implemented at all and I didn't bother to test my example. It looks like it only happens when generics are involved. See the modified example below:
RyanCavanaugh commentedon Apr 19, 2016
Re: your comment, see the
--noImplicitReturnsswitchFix #8162 and #8173: Add root symbols to search in find all referecnes
Merge pull request #8210 from Microsoft/Fix8162