http://d.puremagic.com/issues/show_bug.cgi?id=7245
Summary: [CTFE] Address of ref foreach parameter changes to
point after array
Product: D
Version: D1 & D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Denis <[email protected]> 2012-01-08 08:37:03 MSK
---
---
int func() {
int[2] arr;
int* ptr;
foreach(i, ref p; arr) if(i == 0)
ptr = &p;
int j = *ptr;
return 0;
}
enum e = func();
---
Error: array index 2 is out of bounds [0,0][0 .. 2]
Error: CTFE internal error: illegal value __error
Assertion failure: 'isCtfeValueValid(newval)' on line 6369 in file
'interpret.c'
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------