www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16097] New: Confusing error message when concatenating


          Issue ID: 16097
           Summary: Confusing error message when concatenating
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: leandro.lucarella sociomantic.com

This might happen with other variations of char* I guess:

void f()
    const(char)* s = "some literal";
    auto ss = "hello" ~ s;

/tmp/s.d(6): Error: incompatible types for (("hello") ~ (s)): 'const(char)*'
and 'const(char)*'

It might be helpful to mention there is no operator `~` defined for these two
types, and maybe even suggest a way to do it (convert to something else using
some std function)?

May 30 2016