[Issue 7245] [CTFE] Address of ref foreach parameter changes to point after array

2015-06-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7245

Andrei Alexandrescu and...@erdani.com changed:

   What|Removed |Added

Version|D1  D2 |D2

--


[Issue 7245] [CTFE] Address of ref foreach parameter changes to point after array

2012-01-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7245


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright bugzi...@digitalmars.com 2012-01-14 
17:40:27 PST ---
https://github.com/D-Programming-Language/dmd/commit/1cbd1959e41d39c812a8f4c1a17eb8535d44547a

https://github.com/D-Programming-Language/dmd/commit/1394b3c55c740106555cd484697019e4a9b77109

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


[Issue 7245] [CTFE] Address of ref foreach parameter changes to point after array

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7245



--- Comment #1 from Denis verylonglogin@gmail.com 2012-01-08 08:57:25 MSK 
---
Another illustration (foreach is in function now):
---
int func() {
int[2] arr;
int* ptr;

void f() {
//Error: variable __aggr3 is used before initialization
foreach(i, ref p; arr) if(i == 0)
ptr = p;
}

f();

int i = *ptr;
return 0;
}

enum e = func();
---

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