ClosedTypeHierarchyDiagnosticSuppressor
ClosedTypeHierarchyDiagnosticSuppressor copied to clipboard
Add support for destructured records
This PR adds support for patterns that destructure a record with positional params.
abstract record Root
{
Root() {}
public sealed record Leaf1(int Value) : Root {}
public sealed record Leaf2 : Root {}
}
return root switch
{
Root.Leaf1(var v) => 0,
Root.Leaf2 => 1,
};
I wasn't sure how to create a unit test with a specific editor config so I added a new constructor param to the suppressors. Let me know if that's no good.
I have seen the PR but have not had time yet to look at it, sorry.
Ran into this as well, would be nice to have this in a new version.
closing in favor of #10