dotnet / dotnet/vscode-csharp

Unexpected parameter info pop-up when typing certain tokens inside expression as argument

Open
#8,852 5 comments 0 reactions 0 assignees View on GitHub
untriaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

**Full issue information + repro project**:
https://github.com/just-ero/roslyn-issues-repros/tree/main/5.0.0/007_UnexpectedParameterInfo_ExpressionAsArgument

### Version

> [!NOTE]
> **Roslyn**: 5.0.0-2.25371.17 (ce148ddd)
> **.NET SDK**: 10.0.100-preview.6.25358.103
>
> **Visual Studio Code**: 1.102.2
> **C# Extension**: 2.87.26
> **C# Dev Kit Extension**: 1.41.5

### Steps to Reproduce

1. Add the following code wherever syntactically applicable:
```cs
void M1(Action a) { }

void M2()
{
M1(() => { });
}
```
2. Type tokens like `,`, `{`, `(`, `[` anywhere in the lambda expression's block body.

### Expected Behavior

The parameter hint does not appear, because we're no longer in the argument context.

### Actual Behavior

It does.

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.