dotnet / dotnet/format

dotnet-format will remove `async` from overrided methods which produce IAsyncEnumerable<T> without await, and produce invaild code

Open
#1,474 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

dotnet format --version
6.0.252703+68bc36719088c86b0ff01334039b0611741b8276
(from dotnet sdk 6.0.100)

```cs
public abstract class X1
{
public abstract IAsyncEnumerable Test();
}

public class X2 : X1
{
public override async IAsyncEnumerable Test()
{
yield return new object();
}
}
```
`dotnet-format` shouldn't remove `async`, still it will produce invaild code.
And it also shouldn't change the sign of method, since it override an public API.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.