Hi, I'm looking for ways to simplify this code. I believe usingnamespace cannot be used in such scenario.
pub fn MyUnion(comptime support_u16: bool) type {
return switch (support_u16) {
true => union {
first: u32,
second: [4]u8,
third: [2]u16,
},
false => union {
first: u32,
second: [4]u8,
},
};
}