1

I have the following usual code construct with an interface, an implementing class and a call to the interface method.

public class ImplementingClass : IInterface
{
  public void Method<T>() {}
}

public interface IInterface()
{
  void Method<T>();
}

public class CallingClass()
{
  private void CallingMethod()
  {
    IInterface instance = new ImplementingClass();
    instance.Method<object>();
  }
}

From this StackOverflow answer I learned that Ctrl+Click means "go to declaration" (i. e. the interface) and Ctrl+Alt+Click means "go to implementation" in ReSharper.

When I Ctrl+Click on Method in instance.Method();, it takes me to IInterface.Method. Ctrl+Click on that declaration again does nothing - so far as expected.

But: if I Ctrl+Alt+Click on instance.Method();, it still takes me to IInterface.Method, and only the second Ctrl+Alt+Click takes me to ImplementingClass.Method.

Is that a setting problem in ReSharper, a shortcut interference with Visual Studio Professional 2015, a misunderstanding of what "implementation" means in this context, or is it simply a bug in ReSharper 9.2?

N. B.: "Go to implementation" from the context menu of instance.Method(); takes me directly to ImplementingClass.Method, and there is only one implementation of that interface.

The interface itself has no generics and is not inherited, but the method has a generic (as shown above). It could possibly be related to this problem, although my setup is not quite as complex as over there.

Community
  • 1
  • 1
LWChris
  • 3,320
  • 1
  • 22
  • 39

1 Answers1

0

I suspect this is a bug in ReSharper 9.2. I tried it in 10.0.2, and it looks like it's completely broken - Ctrl+Alt+Click does nothing, while Ctrl+Shift+Click just shows the context menu. I've raised an issue: RSRP-452834.

citizenmatt
  • 18,085
  • 5
  • 55
  • 60