I has problems:

class T
{
__gshared int global;
int member;

this()
{
member = global;
}

__gshared this()
{
global = 10;
}
}

fatal error LNK1179: invalid or corrupt file: duplicate COMDAT
'_D2db2ui2ui1T6__ctorMFZC2db2ui2ui1T (db.ui.ui.T db.ui.ui.T.__ctor())'



Further, if I write this code:

  void f()
  {
T t = new T;
  }

Error: db.ui.ui.T.__ctor called with argument types () matches both:
     db.ui.ui.T.this()
and:
     db.ui.ui.T.this()

It seems __gshared constructors aren't working... although I thought they
did; I'm sure I've used them before in various occasions :/

Reply via email to