digitalmars.D.bugs - [Issue 9299] New: std.algorithm.minPos of const(int)[]
- d-bugmail puremagic.com (39/39) Jan 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
- d-bugmail puremagic.com (15/15) Jan 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
- d-bugmail puremagic.com (9/11) Jan 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
- d-bugmail puremagic.com (6/6) Jan 12 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
- d-bugmail puremagic.com (11/11) Jan 13 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
- d-bugmail puremagic.com (10/10) Jan 13 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
- d-bugmail puremagic.com (7/8) Jan 13 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9299
http://d.puremagic.com/issues/show_bug.cgi?id=9299 Summary: std.algorithm.minPos of const(int)[] Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc import std.algorithm: minPos; void main() { const(int)[] a1 = [2, 3, 1, 4]; assert(minPos(a1) == [1, 4]); immutable int[] a2 = [2, 3, 1, 4]; assert(minPos(a2) == [1, 4]); } DMD 2.062alpha gives: ...\dmd2\src\phobos\std\algorithm.d(1489): Error: cannot modify const expression target ...\dmd2\src\phobos\std\algorithm.d(6183): Error: template instance std.algorithm.move!(const(int)) error instantiating test.d(4): instantiated from here: minPos!("a < b", const(int)[]) test.d(4): Error: template instance std.algorithm.minPos!("a < b", const(int)[]) error instantiating ...\dmd2\src\phobos\std\algorithm.d(1489): Error: cannot modify immutable expression target ...\dmd2\src\phobos\std\algorithm.d(6183): Error: template instance std.algorithm.move!(immutable(int)) error instantiating test.d(6): instantiated from here: minPos!("a < b", immutable(int)[]) test.d(6): Error: template instance std.algorithm.minPos!("a < b", immutable(int)[]) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9299 monarchdodra gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |monarchdodra gmail.com AssignedTo|nobody puremagic.com |monarchdodra gmail.com Hum. This pull is related: https://github.com/D-Programming-Language/phobos/commit/58fef77d02919f844b83b7de157420d9f8f8edda#L0R5498 It added support for non-LvalueRange, but broke support for immutables. I'll fix it. minCount also seems impacted :/ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9299It added support for non-LvalueRange, but broke support for immutables. I'll fix it.Thank you. If you want to fix it, then I suggest to also add a good amount of unittests, to catch future related problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9299 https://github.com/D-Programming-Language/phobos/pull/1070 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 12 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9299 Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/5afbfac8c50d1cc1ef2d211d1f09ca3c47a2d67f Fixes issue 9299 - std.algorithm.minPos of const(int)[] https://github.com/D-Programming-Language/phobos/commit/bdc959933c56d664d59bbd2ff4c911f7e50c490a Fixes issue 9299 - std.algorithm.minPos of const(int)[] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 13 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9299 Alex Rønne Petersen <alex lycus.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |alex lycus.org Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 13 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9299minCount also seems impacted :/I have created Issue 9314 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 13 2013