ErrorProne.NET icon indicating copy to clipboard operation
ErrorProne.NET copied to clipboard

EPS09 doesn't check for target-typed new

Open onyxmaster opened this issue 1 year ago • 0 comments

Hi. Thanks for the ErrorProne.NET.

Unfortunately it triggers false positive EPS09 when using target-typed new. It handles "normal" constructors properly, but doesn't work when the type is omitted.

void F(in MyStruct v) { }

void G() => F(new());

onyxmaster avatar Feb 12 '24 11:02 onyxmaster