[Bug 47] New: Entity name shadowing: compiler not acting according to spec.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 14 08:53:14 PST 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=47
Summary: Entity name shadowing: compiler not acting according to
spec.
Product: D
Version: 0.149
Platform: PC
OS/Version: Windows
Status: NEW
Severity: minor
Priority: P3
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: daiphoenix at lycos.com
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)
--
More information about the Digitalmars-d-bugs
mailing list