[Issue 4889] Declarator in "if" statement allows name shadowing
https://issues.dlang.org/show_bug.cgi?id=4889 Mathias LANG changed: What|Removed |Added Status|NEW |RESOLVED CC||pro.mathias.l...@gmail.com Resolution|--- |WONTFIX --- Comment #4 from Mathias LANG --- Since this works in D2 but not D1, closing. --
[Issue 4889] Declarator in "if" statement allows name shadowing
http://d.puremagic.com/issues/show_bug.cgi?id=4889 Walter Bright changed: What|Removed |Added Keywords|spec| CC||bugzi...@digitalmars.com --- Comment #3 from Walter Bright 2012-01-23 23:28:02 PST --- D1 only bug, not a spec issue. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4889] Declarator in "if" statement allows name shadowing
http://d.puremagic.com/issues/show_bug.cgi?id=4889 yebblies changed: What|Removed |Added CC||yebbl...@gmail.com Version|D2 |D1 Severity|enhancement |normal --- Comment #2 from yebblies 2011-06-15 08:45:40 PDT --- Errors in D2 (2.053) but still allowed in D1 (1.068) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4889] Declarator in "if" statement allows name shadowing
http://d.puremagic.com/issues/show_bug.cgi?id=4889 Stewart Gordon changed: What|Removed |Added Keywords||spec CC||s...@iname.com OS/Version|Linux |All --- Comment #1 from Stewart Gordon 2010-09-18 17:26:28 PDT --- I'm not sure if the classification of this as enhancement is correct. The mention of the restriction is under ScopeStatement "Even though a new scope is introduced, local symbol declarations cannot shadow (hide) other local symbol declarations in the same function." but was the intent of this statement that it would apply just as well to a variable declared in an if statement? After all, it seems to me that reality its scope is that of the ScopeStatement, even though it isn't lexically within it. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---