Skip to content

CodeLens doesn't work on records #47445

@PathogenDavid

Description

@PathogenDavid

Version Used:

Visual Studio 16.8.0 Preview 2.1
.NET SDK 5.0.100-preview.8.20417.9
Compiler version: '3.8.0-2.20418.7 (0276b9b)'. Language version: 9.0.

Steps to Reproduce:

Enter the following code:

public class Person
{
    public string Name { get; init; }
}

public record PersonRecord
{
    public string Name { get; init; }
}

public static class Factory
{
    public static Person MakePerson(string name)
        => new() { Name = name };

    public static PersonRecord MakeRecord(string name)
        => new() { Name = name };
}

Expected Behavior:

Code Lens shows number of references above PersonRecord and PersonRecord.Name.

Actual Behavior:

Code Lens is missing for record type and its members:

image

Metadata

Metadata

Labels

Area-IDEConcept-Design DebtEngineering Debt, Design Debt, or poor product code qualityDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comFeature - RecordsRecordsIDE-IntelliSenseCompletion, Signature Help, Quick Info

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions