[Issue 1059] New: String literal concatenated with array of chars - inconsistent behavior

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 13 14:36:41 PDT 2007


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

           Summary: String literal concatenated with array of chars -
                    inconsistent behavior
           Product: D
           Version: 1.009
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: gavrilyak at gmail.com


char[] hi1 = "h" ~ "i";   //works
  char[] hi1 = "h" ~ ['i'];   //works
  char[] hi2 =  ['h'] ~ "i";  // semicolon expected, not '~'
                              //found '~' instead of statement
  char[] hi3 =  ['h'] ~ ['i'];// semicolon expected, not '~'
                              //found '~' instead of statement

All 4 case means the same and should behave the same way.


-- 



More information about the Digitalmars-d-bugs mailing list