digitalmars.D - Re: Arguments and attributes with the same name
- Bane <branimir.milosavljevic gmail.com> Mar 04 2010
This can be solved if the compiler warns when an assignment is from a variable to the same one. x = x; // error: assignment has no effect
Nice and useful.
Mar 04 2010
On 03/04/2010 02:44 PM, Bane wrote:This can be solved if the compiler warns when an assignment is from a variable to the same one. x = x; // error: assignment has no effect
Nice and useful.
struct A { int i; void opAssign(A a) { i = a.i + 1; } } why not?
Mar 04 2010