www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13141] New: array cast from string[] to immutable(char[][])

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 puremagic.com
          Reporter: thecybershadow 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.

--
Jul 16 2014