Bug 47 – Entity name shadowing: compiler not acting according to spec.
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-03-14T10:53:00Z
Last change time
2014-02-15T02:08:35Z
Keywords
accepts-invalid
Assigned to
bugzilla
Creator
bruno.do.medeiros+deebugz
Comments
Comment #0 by bruno.do.medeiros+deebugz — 2006-03-14T10:53:10Z
The D Doc, in http://www.digitalmars.com/d/statement.html , says the following piece of code is invalid:
void func2() {
int x;
{
int x; // illegal, x is multiply defined in function scope
}
}
However the code compiles fine. Is this a compiler error or Doc error? In other words is entity name shadowing valid or not? (IMO it should be valid)
Comment #1 by bugzilla — 2006-06-20T02:01:41Z
Fixed 0.161
Comment #2 by smjg — 2010-08-19T06:28:38Z
*** Issue 2195 has been marked as a duplicate of this issue. ***