May 07, 2011 [Issue 5949] New: Mutable enum matrix rows | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5949 Summary: Mutable enum matrix rows Product: D Version: unspecified Platform: x86 OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-05-07 16:08:46 PDT --- This D2 code compiles and runs with no errors (DMD 2.053beta), but it's wrong: void main() { enum int[][] data = [[1]]; foreach (a; data) a[0]++; assert(data[0][0] == 1); foreach (ref a; data) a[0]++; assert(data[0][0] == 1); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation