Restrict Class Properties?

Manfred Nowak svv1999 at hotmail.com
Sun Feb 11 22:50:30 PST 2007


Currently class properties are not restricted to in-parameters.

This means, that it is possible to assign to the RHS of "=".

class D{
  void property( out int p){
    p= 42;
  }
}
auto d= new D;
int x;
d.property= x;

This seems to be surprising.

-manfred



More information about the Digitalmars-d mailing list