http://d.puremagic.com/issues/show_bug.cgi?id=4889
Summary: Declarator in "if" statement allows name shadowing
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Tomash Brechko <[email protected]> 2010-09-18
13:24:55 PDT ---
The following compiles without error with dmd 2.049:
void
main()
{
int i = 1;
if (int i = 2)
{
assert(i == 2);
}
assert(i == 1);
}
It seems prohibiting such shadowing would be in line with block shadowing
rules.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------