https://issues.dlang.org/show_bug.cgi?id=12575
Andrej Mitrovic <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Andrej Mitrovic <[email protected]> --- Technically they are part of a "namespace", since you can disambiguate them: ----- mixin template T1() { extern(C) void fizzle() { } } mixin template T2() { extern(C) void fizzle() { } } mixin T1!() t1; mixin T2!() t2; void main() { t1.fizzle(); t2.fizzle(); } ----- So I guess that's why they're mangled. As a workaround you can use this: ----- mixin template T() { // or just pragma(mangle, "fizzle"), but this will at least error if // you change the function name pragma(mangle, __traits(identifier, fizzle)) extern(C) void fizzle(); } mixin T!(); void main() { fizzle(); } ----- --
