www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13393] New: std.algorithm.joiner Assertion failure in

https://issues.dlang.org/show_bug.cgi?id=13393

          Issue ID: 13393
           Summary: std.algorithm.joiner Assertion failure in popFront()
                    when using with cartesianProduct
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: mrsmith33 yandex.ru

Here is a reduced test case.

-------------------------------------------------------
import std.algorithm;
import std.range;
import std.stdio;

void main()
{
    [cartesianProduct([0],[0],[0])].joiner.writeln;
}
-------------------------------------------------------

Fails with core.exception.AssertError std\algorithm.d(3804): Assertion failure
in popFront()

in pure nothrow  nogc  safe void
std.algorithm.joiner!(std.algorithm.cartesianProduct!(int[], int[],
int[]).cartesianProduct(int[], int[],
int[]).Result[]).joiner(std.algorithm.cartesianProduct!(int[], int[],
int[]).cartesianProduct(int[], int[], int[]).Result[]).Result.popFront() at
D:\D\dmd2\windows\bin\..\import\std\algorithm.d(3805)
0x004020CA in _Dmain at D:\test\main2.d(7)

Tested with phobos commit f0e9039227ee0fee664cde2d29a733cc69873912

Current master on dpaste works fine http://dpaste.dzfl.pl/b2ced50be1a6

--
Aug 28 2014