Skip to content

Inconsistency: 'Go to definition' navigates to a position, while 'Go to implementation' to a span #82890

@DoctorKrolic

Description

@DoctorKrolic

Version Used:
VS 2026 Insiders [11612.153]

Steps to Reproduce:

public partial class MyClass
{
    public partial int GetValue(); // 1
}

public partial class MyClass
{
    public partial int GetValue() // 2
    {
        return 0;
    }
}

Go to implementation at // 1 - IDE takes you to an implementation span like this:

public partial class MyClass
{
    public partial int GetValue(); // 1
}

public partial class MyClass
{
    public partial int [|GetValue|]() // 2
    {
        return 0;
    }
}

Now to the reverse - go to definition at // 2 - IDE takes you to the definition part, but only to a position:

public partial class MyClass
{
    public partial int $$GetValue(); // 1
}

public partial class MyClass
{
    public partial int GetValue() // 2
    {
        return 0;
    }
}

Since both functions perform navigation such difference in behavior makes it inconsistent. They should navigate user the same way. The span approach seems more preferable to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions