Record type doesn't show up in completion list for generic type parameter above the record declaration
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
If I define a `record` type, the type doesn't show up in the completion list in code before the type is defined, even though the code does build.
The screenshot is from a Razor document but the issue repros in a plain .cs file too.

The `record` type does show up in the completion list in code after the `record` type is defined.
If I define a `class` instead of a `record`, then the type shows up in completions before and after the type definition.
Contributor guide
Research direction
Start by reproducing the completion behavior in a plain .cs file, then verify whether it also occurs in the Razor document shown in the report. Compare a record declaration with a class declaration when referenced from a generic type parameter before the declaration; done means the record appears in completion results before and after its declaration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100