[Issue 13141] New: array cast from string[] to immutable(char[][]) is not supported at compile time

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 16 15:46:33 PDT 2014


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

          Issue ID: 13141
           Summary: array cast from string[] to immutable(char[][]) is not
                    supported at compile time
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: thecybershadow at gmail.com

Program:

import std.algorithm;
import std.array;
import std.conv;

immutable string[] splitterNames = [4].map!(e => e.text()).array();

Compiler output:

test.d(5): Error: array cast from string[] to immutable(char[][]) is not
supported at compile time

Worked in v2.065.0.

Introduced in https://github.com/D-Programming-Language/dmd/pull/3602.

--


More information about the Digitalmars-d-bugs mailing list