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

          Issue ID: 23117
           Summary: crash in @safe code after CTFE
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

the following code crashes.

void main() @safe
{
    enum crash = foo([1]);
    import std.stdio : writeln;

    writeln(crash);
}

auto foo(in int[] r) @safe nothrow pure
{
    import std.algorithm : map;
    import std.range : enumerate;

    return r.map!(x => enumerate(r));
}

--

Reply via email to