You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a dunet user, when using switch expression with dunet-generated unions, I don't want to be warned about the switch expression not being exhaustive when it is provably so.
For example, the following should not emit a warning:
What about creating a marker exception that tells dunet to run its own analyzer on this switch expression? That analyzer can do the proper exhaustiveness check with the knowledge that dunet unions are closed types. Something like:
Shapeshape=newShape.Circle(3.14);vararea=shapeswitch{Circlecircle=>3.14*circle.Radius*circle.Radius,Rectanglerect=>rect.Length*rect.Width,
_ =>Unreachable(),// Issues warning that there's no case for `Triangle`.};[Union]partialrecordShape{partialrecordCircle(doubleRadius);partialrecordRectangle(doubleLength,doubleWidth);partialrecordTriangle(doubleBase,doubleHeight);}
As a dunet user, when using switch expression with dunet-generated unions, I don't want to be warned about the switch expression not being exhaustive when it is provably so.
For example, the following should not emit a warning:
The text was updated successfully, but these errors were encountered: