Home Dashboard Directory Help
Search

Find all references - fails to find references if an identically named method with a ref parameter exists by Ansssss


Status: 

Closed
 as Fixed Help for as Fixed


2
0
Sign in
to vote
Type: Bug
ID: 805039
Opened: 10/10/2013 11:41:28 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

Visual Studio has a "Find All References" feature that can be used by right-clicking on symbol (e.g. method name) and clicking "Find All References". It should show everywhere that the symbol is referenced and where it is defined. Doing this action will also cause the symbol to be highlighted if it is in the current window.

If a class has two methods with signatures that are identical aside from one parameter being a reference parameter on one of the methods, the Find All References functionality will not find instances where either of those methods are invoked. Here is a simple, self-contained example which can reproduce the behavior:

public class Junk
{
    public void DoThing(ref string p) { }
    public void DoThing(string p) { }
    public static void Main()
    {
        Junk x = new Junk();
        //Find All References, finds the definition of DoThing (correctly),
        // but does not find this invocation of DoThing (bug)
        x.DoThing("asdf"); //line 10
    }
}

I tested this on Visual Studio 2012 Update 3 and Visual Studio 2010 SP1Rel.
Details
Sign in to post a comment.
Posted by Microsoft on 12/4/2013 at 8:40 AM
Hi,

Thanks very much for contacting us about this issue. We have fixed it for the next major release of Visual Studio.

Kind Regards,
Dustin Campbell
Visual Studio Managed Languages
Posted by Microsoft on 10/10/2013 at 10:26 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 10/10/2013 at 11:52 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.