http://d.puremagic.com/issues/show_bug.cgi?id=3878



--- Comment #9 from bearophile_h...@eml.cc 2010-10-17 16:05:41 PDT ---
In this enhancement request I am asking for ideas to avoid a common but
specific kind of bug.
One idea (not mine) to avoid some of those bugs is to introduce the
this.fieldname syntax for method argument (type is optional and it may be
different from the field type). In the constructor the argument assigns
directly to the field:


class Foo {
    int x;
    this(this.x) {}
    void inc(int x) { this.x += x; }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to