Thread overview | |||||
---|---|---|---|---|---|
|
February 20, 2011 [Issue 5630] New: array() of iterable of immutable items | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=5630 Summary: array() of iterable of immutable items 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 --- Comment #0 from bearophile_hugs@eml.cc 2011-02-20 15:01:52 PST --- A D2 program: import std.algorithm: map; import std.array: array; void main() { auto r = map!q{ "A"[0] }([0, 1, 2]); auto a = array(r); // Error: result[i] isn't mutable assert(a == "AAA"); } DMD 2.052 gives the errors: ...\dmd\src\phobos\std\array.d(62): Error: result[i] isn't mutable test.d(5): Error: template instance std.array.array!(Map!(result,int[])) error instantiating In my opinion array() needs to be able to build an array of immutable items too, like a string from its immutable chars. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 20, 2013 [Issue 5630] array() of iterable of immutable items | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5630 irritate <irritate@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |irritate@gmail.com --- Comment #1 from irritate <irritate@gmail.com> 2013-06-19 19:20:02 PDT --- Issue does not occur for me on head revision, DMD v2.064. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 20, 2013 [Issue 5630] array() of iterable of immutable items | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=5630 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from bearophile_hugs@eml.cc 2013-06-20 03:08:24 PDT --- (In reply to comment #1) > Issue does not occur for me on head revision, DMD v2.064. OK, closed, despite I don't know if the test suite has a test case like that. -- 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