[Issue 668] Use of *.di files breaks the order of static module construction
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 6 18:59:53 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=668
------- Comment #11 from sean at f4.ca 2007-08-06 20:59 -------
----
// Header.di
class Thread
{
final char[] name();
static const int PRIORITY_MIN;
static const int PRIORITY_MAX;
static Thread getThis();
static this(){}
}
----
// Main.d
private import Header;
class Main
{
void go()
{
char[] threadName = Thread.getThis.name;
}
}
----
C:\> dmd -c -inline -release Main.d
The crucial bit is to have -inline and -release set. Clearing either of these
eliminated the problem.
--
More information about the Digitalmars-d-bugs
mailing list