concatenation

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Jan 24 15:09:42 PST 2011


in the following:

void main(){
   char[] x;
   string s;
   string y;

   y = s ~ x;
}

tok.d(5): Error: cannot implicitly convert expression 
(cast(const(char)[])s ~ x) of type char[] to string

why should typeof(s ~ x) == char[] ?


More information about the Digitalmars-d-learn mailing list