New
v1.15.0
What's Changed
- Binary
orpatterns are now also checked for exhaustiveness. For example:
[Union]
partial record Shape
{
partial record Circle(double Radius);
partial record Rectangle(double Length, double Width);
partial record Square(double Length);
partial record Triangle(double Base, double Height);
}
Shape? shape = null;
var sides = shape switch
{
// This is now considered as handling both the `Circle` and `null` cases.
Circle or null => 0,
// This is now considered as handling both the `Rectangle` and `Square` cases.
Rectangle or Square => 4,
Triangle t => 3,
};
Package
https://www.nuget.org/packages/Dunet/1.15.0
Full Changelog
https://github.com/domn1995/dunet/compare/v1.14.0...v1.15.0