const TTag = enum {
one,
two,
};
const TStorage = union(TTag) {
one: void,
two: u8,
};
const T = union(TTag) {
one: OneHandler,
two: TwoHandler,
};
The code I'm using is similar to the one above. How would I go about checking whether the tags of the input param1: T, param2: TStorage are equal, and if so, get the active field (param1.one and param2.one if the tag is one, for example)? I could manually populate switches to solve this, but is there a solution to this much like inline else for a single tagged union?