[Issue 668] Use of *.di files breaks the order of static module construction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 10 02:49:38 PST 2006


http://d.puremagic.com/issues/show_bug.cgi?id=668


fvbommel at wxs.nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Windows                     |All
            Version|0.176                       |0.177




------- Comment #1 from fvbommel at wxs.nl  2006-12-10 04:49 -------
The likely cause:
-----
urxae at localhost:~/tmp$ cat lib.d
bool initialized;
static this(){ initialized = true; } 
urxae at localhost:~/tmp$ dmd -H -c lib.d
urxae at localhost:~/tmp$ cat lib.di
// D import file generated from 'lib.d'
bool initialized;
-----
The static constructor isn't present in the .di so the compiler doesn't see it
when compiling main.d.

Confirmed on dmd-0.177/Linux.


-- 




More information about the Digitalmars-d-bugs mailing list