On Sun, 03 May 2009 05:25:09 -0400, Unknown W. Brackets <unkn...@simplemachines.org> wrote:

This code works fine (D 2.x only):

class Test
{
   private int[int] _testMap;
   public ref int[int] testMap() {return _testMap;}
}

void main()
{
   Test test = new Test();
   test.testMap[0] = 1;
}

Note the "ref". Otherwise, a value is returned which is not modifiable. This will also fix test.array.length. Nothing wrong here, no creepy bad temporary property problems.

The original code should work, this is a problem. An AA is not a value type.

-Steve

Reply via email to