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

Fixed issue with "go to implementation" and symbol overrides #1302

Merged
merged 6 commits into from
Oct 31, 2018

Conversation

filipw
Copy link
Member

@filipw filipw commented Sep 25, 2018

This PR fixes the issue where "find implementation" OmniSharp would not find symbol overrides in child types. We were missing the look up of overrides on the symbols returned from SymbolFinder.FindImplementationsAsync.

Consider the following:

    interface IFoo
    {
        string Hi();
    }

    public class Bar : IFoo
    {
        public virtual string Hi() => "hi";
    }

    public class Baz : Bar
    {
        public override string Hi() => "hello";
    }

In Visual Studio, trying to go to implementation of Hi(), from the interface declaration, would find both Bar.Hi() and Baz.Hi(). However, OmniSharp would find only Bar.Hi().

This is with the fix applied:

screenshot 2018-09-25 19 38 17

@filipw
Copy link
Member Author

filipw commented Oct 31, 2018

@rchande @david-driscoll @DustinCampbell can you guys take a quick look? I'd like to get this in so that it doesn't lay around for ages 🎃

Copy link

@rchande rchande left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. Sorry for the delay.

@filipw
Copy link
Member Author

filipw commented Oct 31, 2018

thanks - there is another PR on the same file(s) so we need to start unclogging them 🙃

@filipw filipw merged commit a21ea83 into OmniSharp:master Oct 31, 2018
@filipw filipw deleted the bugfix/goto-implementation-fix branch October 31, 2018 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants