www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11923] New: dmd v2.065-devel-b1aa0cb compiles with illegal shadowed declaration

https://d.puremagic.com/issues/show_bug.cgi?id=11923

           Summary: dmd v2.065-devel-b1aa0cb compiles with illegal
                    shadowed declaration
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: sumit.adhikari gmail.com



23:22:12 PST ---
Following piece of code compiles and executes

void main(){

   import std.parallelism, std.range;

   immutable n = 10 ;
   immutable float x ; // x declared here

   foreach(i; parallel(iota(n))) {
       immutable x = i ; // x declared here once again
   }

}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 13 2014