Given the code:

module mangle;

extern (C) bool runModuleUnitTests()
{
    static struct Console
    {
        Console opCall( in char[] val )
        {
            return this;
        }
    }
    return false;
}


The D frontend will generate the mangled symbol (and its initialiser) as:

_D6mangle18runModuleUnitTestsUZb7Console6opCallMFxAaZSrunModuleUnitTests7Console
_DrunModuleUnitTests7Console6__initZ

Instead of the more desired:

_D6mangle18runModuleUnitTestsFZb7Console6opCallMFxAaZS6mangle18runModuleUnitTestsFZb7Console
_D18runModuleUnitTest7Console6__initZ


Is this desirable? It makes demangling such symbols difficult.

Reply via email to