overloadable maxTypeSize; [T, ...] maxTypeSize(static T, ...) = max(TypeSize(T), maxTypeSize(...)); [T] maxTypeSize(static T) = TypeSize(T); record Union[...] { data : Array[UByte, maxTypeSize(...)]; } unionAs(u : U, static T) { returnref Pointer[T](&u.data)^; }