[Issue 6797] New: Fake changes to enum array of array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 8 19:17:49 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6797
Summary: Fake changes to enum array of array
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-10-08 19:17:03 PDT ---
Maybe this was reported already, because it looks like a basic bug.
This compiles and runs with no errors (DMD 2.056head):
void main() {
enum int[][] array = [[0, 1], [2, 3]];
foreach (r; array)
r[0] *= 10;
foreach (ref r; array)
r[0] *= 10;
assert(array == [[0, 1], [2, 3]]);
}
This is a big hole. I think the implementation of compile-time constants need a
lot of debugging.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list