icsharpcode/ILSpy
Ver no GitHubWhen navigating to an overridden virtual method from the overriding derived class, navigate to the overridden method
Open
#819 aberto em 5 de jul. de 2017
Help WantedUI
Métricas do repositório
- Stars
- (25.162 stars)
- Métricas de merge de PR
- (Mesclagem média 15d 22h) (61 fundiu PRs em 30d)
Description
Consider the following class structure:
class Base
{
public virtual int Foo() { return 42; }
}
sealed class Derived : Base
{
public override int Foo() { return 123; }
public int Bar() { return this.Foo(); }
}
Suppose I'm looking at Derived::Bar, and I click Foo(). I am currently taken to Base::Foo which is misleading because in actuality Derived::Foo will be called.
I made Derived sealed just to drive my point further, obviously even if it's non-sealed Derived::Foo would be a better guess.