www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18420] New: string as an initializer should work in any place

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

          Issue ID: 18420
           Summary: string as an initializer should work in any place an
                    immutable char array does
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: schveiguy yahoo.com

e.g.:

alias IC = immutable char;
ubyte[3] x = [IC('a'), IC('b'), IC('c')]; // OK
ubyte[3] y = "abc"; // Error

--
Feb 11 2018