proposals/standard-unions.md
A family of nominal type unions exist in the TBD namespace that can be used across assemblies as the standard way to specify a type union without needing to declare and name one.
public union Union<T1, T2>(T1, T2);
public union Union<T1, T2, T3>(T1, T2, T3);
public union Union<T1, T2, T3, T4>(T1, T2, T3, T4);
...
Union<int, string> x = 10;
...
var _ = x switch
{
int v => ...,
string v => ...
}
Union are added to a runtime library.The union types are added to the same assembly that houses the ValueTuple, Func and Action types.