[Issue 19850] New: double nested joiner .back falsely thinks the range is empty

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 6 16:55:04 UTC 2019


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

          Issue ID: 19850
           Summary: double nested joiner .back falsely thinks the range is
                    empty
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: default_357-line at yahoo.de

Consider the following code:

    auto outer = [[[0]]];
    auto result = outer.map!(
      middle => middle.map!(
        inner => inner.map!(
          i => 0
        )
      ).joiner
    ).joiner.back;

Expected: result == 0
Got:
core.exception.AssertError at dmd-2.085.1/linux/bin64/../../src/phobos/std/algorithm/iteration.d(567):
Attempting to fetch the back of an empty map.

--


More information about the Digitalmars-d-bugs mailing list