dotnet / dotnet/roslyn

Complete word appends `1` to parameter name

Open
#73,290 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

**Version Used**: 17.10.0 P6

**Steps to Reproduce**:
Request completion (or `Ctrl`+`Space`) at parameter name:

```cs
Task WorkAsync(CancellationToken cancellat$$ionToken)
{

}
```

https://github.com/dotnet/roslyn/assets/9047283/a84ed81e-0b67-412d-a05a-ce76bd22ddee

**Diagnostic Id**:
N/A

**Expected Behavior**:
Completions are displayed for suggested names e.g. `cancellation`, `token`, `cancellationToken`.

**Actual Behavior**:
Parameter name `cancellationToken` is completed to `cancellationToken1` without offering and displaying options.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the completion request in the C# editor with the provided CancellationToken example and compare the expected suggestions with the actual insertion. Trace the parameter-name completion behavior in the Roslyn repository; done means the suggested names are displayed and choosing cancellationToken no longer appends 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.