Thread overview
[Issue 15891] Compiler error when std.algorithm.cache and std.algorithm.joiner and map composed
Apr 08, 2016
Jonathan M Davis
Dec 04, 2019
berni44
[Issue 15891] Compiler error when std.algorithm.cache after 2 layers of std.algorithm.map
Dec 04, 2019
berni44
Dec 04, 2019
Dlang Bot
Jan 13, 2020
Dlang Bot
April 08, 2016
https://issues.dlang.org/show_bug.cgi?id=15891

Jonathan M Davis <issues.dlang@jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang@jmdavisProg.co
                   |                            |m
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
r.cache.writeln

fails on its own. This looks like it's a problem specifically with cache and not joiner, though it's not clear to me exactly what's going wrong. It looks like it's complaining that caches[0] and caches[1] are assigned values in one branch of the constructor and not another, but I have no idea why that would be an error. I've never seen anything like that before.

--
December 04, 2019
https://issues.dlang.org/show_bug.cgi?id=15891

berni44 <bugzilla@d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@d-ecke.de

--- Comment #2 from berni44 <bugzilla@d-ecke.de> ---
reduced example:

```
import std.algorithm;

void main()
{
    [1].map!(x=>[x].map!(y=>y)).cache;
}
```

--
December 04, 2019
https://issues.dlang.org/show_bug.cgi?id=15891

berni44 <bugzilla@d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Compiler error when         |Compiler error when
                   |std.algorithm.cache and     |std.algorithm.cache after 2
                   |std.algorithm.joiner and    |layers of std.algorithm.map
                   |map composed                |

--
December 04, 2019
https://issues.dlang.org/show_bug.cgi?id=15891

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@berni44 created dlang/phobos pull request #7302 "Fix Issue 15891 - Compiler error when std.algorithm.cache after 2 layers of std.algorithm.map" fixing this issue:

- Fix Issue 15891 - Compiler error when std.algorithm.cache after 2
  layers of std.algorithm.map

https://github.com/dlang/phobos/pull/7302

--
January 13, 2020
https://issues.dlang.org/show_bug.cgi?id=15891

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/phobos pull request #7302 "Fix Issue 15891 - Compiler error when std.algorithm.cache after 2 layers of std.algorithm.map" was merged into master:

- 66a2ba02fdfd5d80170592bdb1269c6172342c22 by Bernhard Seckinger:
  Fix Issue 15891 - Compiler error when std.algorithm.cache after 2
  layers of std.algorithm.map

https://github.com/dlang/phobos/pull/7302

--