[Issue 10449] New: Better error message when concatenating string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 23 04:00:17 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10449

           Summary: Better error message when concatenating string
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: michal.minich at gmail.com


--- Comment #0 from Michal Minich <michal.minich at gmail.com> 2013-06-23 04:00:16 PDT ---
void main ()
{
    auto x = "str1" ~
        ~ "str2";  // Error: '"str2"' is not of integral type, it is a string
}

Next time I will know, but it is quite confusing, it should say.

"prefix operator '~' can be applied only to integral type, not to a string. If
you are trying to concatenate string then check for redundant '~'."

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list