"Make method synchronous" fix should not be provided for an interface implementing method
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Version Used**:
Latest public VS preview
**Steps to Reproduce**:
```cs
public class MyClass : I, IAsyncDisposable
{
public async ValueTask DisposeAsync()
{
}
public async Task M()
{
}
}
public interface I
{
Task M();
}
```
Try applying "Make method synchronous" fix for `DisposeAsync` and `M`
**Expected Behavior**:
This fix shouldn't even be in the list. You can prbably argue that we can also change an interface method if it comes from a source interface, but that leads to invalidation of all other use sites, so I don't think that should be an option
**Actual Behavior**:
Applying the fix makes the code uncompilable:
```cs
public class MyClass : I, IAsyncDisposable
{
public ValueTask Dispose()
{
}
public void M()
{
}
}
public interface I
{
Task M();
}
```
Contributor guide
Assessment
This issue has not been assessed yet.