SergeyTeplyakov / ErrorProne.NET

Set of roslyn-based analyzers for catching common C# errors (inspired by Google's error-prone)
MIT License
886 stars 42 forks source link

EPS09 doesn't check for target-typed new #279

Open onyxmaster opened 7 months ago

onyxmaster commented 7 months ago

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());