Static constructor call ordering in imported modules

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Aug 8 19:30:26 PDT 2010


On 08/08/2010 04:13 PM, Walter Bright wrote:
> Andrej Mitrovic wrote:
>> But, according to TDPL, page 189, it states:
>>
>> "MA imports MB. Then A's static class constructors run before B's"
>
> TDPL appears to be incorrect. The compiler is correct.

Yah, it's obvious that if MA imports MB then whatever stuff is in MB 
better be ready to roll when MA wakes up.

This should be in the errata. I finally reinstated the database (which 
I'd deleted by mistake) and re-entered the errata by hand. Here it is:

http://www.erdani.com/tdpl/errata/


Andrei


More information about the Digitalmars-d mailing list