dotnet / dotnet/roslyn

Duplicate results for Find All Refs on a record primary constructor parameter

Open
#80,901 1 comment 0 reactions 0 assignees View on GitHub
Area-IDE Feature - Records Navigation-FAR
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

Using VS main.

**Repro:**
1. Create a console app,
2. Multi-target it to a few frameworks
3. Set program.cs to:
```
var r = new Record("My Record Title");
Console.WriteLine(r.PrimaryConstructorParametrr);

var r2 = new Record2();
Console.WriteLine(r2.Property);

public record Record(string? PrimaryConstructorParametrr);

public record Record2()
{
public string? Property { get; init; }
}
```
3. Run find all refs on the primary constructor parameter, and the property, and observe the difference.

**Actual:**
1 result per target framework for the primary constructor parameter
Image

**Expected:**
Would be good if duplicate results were combined.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.