"bearophile" <[email protected]> wrote in message news:[email protected]... > > situations like x=x; reveal true bugs like: > > class Foo { > int x, y; > this(int x_, int y_) { > this.x = x; > y = y; > > } > }
I get hit much more often by somthing like this....
class Foo {
int m_x, m_y;
this(int x, int y)
{
int m_x = x;
int m_y = y;
}
}
I dont know if it is, but IMO it really should be an error to declare local
variables that hide member variables.
