[Issue 11923] New: dmd v2.065-devel-b1aa0cb compiles with illegal shadowed declaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 13 23:22:14 PST 2014
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 at puremagic.com
ReportedBy: sumit.adhikari at gmail.com
--- Comment #0 from Sumit Adhikari <sumit.adhikari at gmail.com> 2014-01-13 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: -------
More information about the Digitalmars-d-bugs
mailing list