dunet
dunet copied to clipboard
Anonymous union variants
Some times we want to make a very basic union without naming its variants. We should be able to do something like:
public partial record struct Number : Union<int, double>;
This would enable us to do the following:
var integer = new Number.Int();
var @double = new Number.Double();
Should it support generics? Should it require you to name its variants or infer from the type name?