Bug 11923 – dmd v2.065-devel-b1aa0cb compiles with illegal shadowed declaration

Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-13T23:22:12Z
Last change time
2019-11-08T10:51:09Z
Assigned to
No Owner
Creator
Sumit Adhikari

Comments

Comment #0 by sumit.adhikari — 2014-01-13T23:22:12Z
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 } }
Comment #1 by r.sagitario — 2019-11-08T10:51:09Z
*** This issue has been marked as a duplicate of issue 16548 ***