struct MyStruct; // <- forward declared (opaque type, never defined)

MyStruct*[] arrayOfPointers;

arrayOfPointers ~= null; // appending doesn't work
arrayOfPointers = new MyStruct*[n]; // or just allocating the array doesn't
work either

Complains:
1>code.d(84): Error: struct MyStruct is forward referenced when looking for
'toHash'
1>code.d(84): Error: struct MyStruct is forward referenced when looking for
'opCmp'
1>code.d(84): Error: struct MyStruct is forward referenced when looking for
'toString'
1>code.d(84): Error: struct MyStruct unknown size
1>code.d(84): Error: struct MyStruct no size yet for forward reference
1>code.d(84): Error: struct MyStruct unknown size
1>code.d(84): Error: struct MyStruct no size yet for forward reference

What's the go here?
Why would it need any of that information? It's just a pointer...

Reply via email to