[Issue 3878] Arguments and attributes with the same name
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 8 13:09:54 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3878
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-03-08 13:09:53 PST ---
As I understand option(2) of this proposal, if a function parameter 'shadows' a
member variable of the same name, it should be illegal to use that parameter as
an lvalue.
I think you're probably correct in claiming that any such code is highly likely
to be a bug. If x is both a parameter and a member, then
x = 3; should almost certainly be
this.x = 3;
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list