On 1/17/2016 9:32 PM, Manu via Digitalmars-d wrote:
void f()
{
   j = 0; // works as expected
   k = 0; // fail
}
private:
__gshared int j;
extern(C++, ns) __gshared int k;

Error: module x variable x.ns.k is private

  https://issues.dlang.org/show_bug.cgi?id=15578

This is not a forward reference bug, it happens even if 'k' is declared before 'f()'.

The workaround is simple: either comment out the 'private' or add 'public' in front of the declaration of 'k'.

Reply via email to