Skip to content

FindAllReferences should find usages of positional members #44559

@jcouv

Description

@jcouv

Placing your cursor on a declaration of a positional should find usages in construction, property access (probably) and with initializers (not yet validated).

Note: we need to clarify whether the declaration of First is a parameter or a property (tracked by #44556)

data class Person(string First, string Last) // place cursor on "First" and invoke GoToReference
{
    Person(string other) { }
    void M()
    {
        var p = new Person(First: "some", Last: "one"); // expect this usage to be found
        _ = p.First; // also expect this usage to be found

        var p2 = new Person(other: ""); // doing the same thing on declaration of "other" finds this usage
    }
}

Relates to #40726 (test plan for "records")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEConcept-Design DebtEngineering Debt, Design Debt, or poor product code qualityFeature - RecordsRecordsIDE-NavigationNavigation and searchResolution-FixedThe bug has been fixed and/or the requested behavior has been implemented

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions