DotNetAnalyzers/IDisposableAnalyzers

IDISP004 or IDISP001 false positives when target typing a new `ValueTask<T>` with `return new(disposable);`

JeremyMorton opened this issue · 0 comments

  public ValueTask<IDisposable> M1Async()
  {
    var disposable = new Disposable();
    return new(disposable);
  }

  public ValueTask<IDisposable> M2Async()
  {
    return new(new Disposable());
  }

image

image