Reduced test. globals.d --- import identifier; static if (0) { } else { alias Uint64 = ulong; alias Int64 = long; } alias sinteger_t = Int64; alias uinteger_t = Uint64; identifier.d --- import globals; struct Token { union { sinteger_t intvalue; uinteger_t unsvalue; } } ---
Don't even need to have it in two separate sources. --- struct Token { union { sinteger_t intvalue; uinteger_t unsvalue; } } static if (0) { } else { alias Uint64 = ulong; alias Int64 = long; } alias sinteger_t = Int64; alias uinteger_t = Uint64;
I thought I recognized the problem. It's likely a duplicate of issue 17883, which I encountered a few years back.