digitalmars.D.bugs - [Issue 10307] New: Bad error message for not supported array operation
- d-bugmail puremagic.com (33/33) Jun 08 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10307
http://d.puremagic.com/issues/show_bug.cgi?id=10307 Summary: Bad error message for not supported array operation Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: diagnostic Severity: minor Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc Currently this array operation is not a supported because there is no explicit allocation of the modified array: import std.math; double sum(double[] data) { double result = 0.0; foreach (d; data) result += d; return result; } void main() { double[2] a = [2.0, 3.0]; assert(sum(a[] ^^ 2) == 13.0); } dmd 2.064alpha gives this error message: test.d(10): Error: Array operation a[] ^^ 2L not implemented I suggest to improve the error message. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 08 2013