www.digitalmars.com         C & C++   DMDScript  

D - bug in module linking

Hi,

    The linker isn't handling duplicate module names in different packages:


module bug;
int eine() {
    return 1;
}
unittest {
    printf("eine ist %d\r\n", eine());
}

module a.bug;
int zwei() {
    return 2;
}
unittest {
    printf("zwei ist %d\r\n", zwei());
}


    When you compile and execute bug and a.bug, only 'zwei is 2' appears on
the screen. If you compile separatedly then link, you get an error about
different previous definitions of __ModuleInfo_bug and __modtest_bug.

    Best regards,
    Daniel Yokomiso.

"You're just jealous because the voices are talking to me and not you."
Nov 26 2002