February 25, 2014 [Issue 7924] reduce does not work with immutable/const as map and filter do | ||||
---|---|---|---|---|
| ||||
https://d.puremagic.com/issues/show_bug.cgi?id=7924 monarchdodra@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |monarchdodra@gmail.com Resolution| |FIXED --- Comment #2 from monarchdodra@gmail.com 2014-02-25 12:23:48 PST --- immutable(Iota) is not a range => Requirements are that the argument is a range. The fact that map and filter accept const ranges is wrong to begin with. There are cases where it is possible to strip the constness, but this is not always the case. Doing a "dumb cast" could have some potentially crash-inducing consequences. It would be better to have a generic solution to this problem, instead of hacking at it again and again in every implementations. So for now, let's just leave this at "Not a range, sorry". -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation