On 9/9/11 11:45 PM, Andrej Mitrovic wrote:
So much for that idea, immutable breaks property functions. Take a look:

class Foo
{
     this()
     {
         value = true;
     }

     @property bool value() { return true; }
     @property void value(bool value) { }
}

void main()
{
     auto foo1 = new Foo;
     auto val1 = foo1.value;

     auto foo2 = new immutable(Foo);
     auto val2 = foo2.value;  // fail
}

Is this a known issue or should I file it?

Did you mark the getter const?

David

Reply via email to