[Issue 16183] New: compile-time string concatenation fails with CTFE and char[] literal involved

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 18 14:16:50 PDT 2016


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

          Issue ID: 16183
           Summary: compile-time string concatenation fails with CTFE and
                    char[] literal involved
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ag0aep6g at gmail.com

This is a further reduction of issue 16182. Filing this as a separate issue,
because issue 16182 is a phobos issue that can be fixed by working around the
compiler bug here.

----
string f() { return ['f']; }
string g(string s) { return s; }
enum string x = f();
enum string y = x ~ '.' ~ g("g"); /* Error: cannot implicitly convert
expression ("f.g") of type char[] to string */
----

--


More information about the Digitalmars-d-bugs mailing list