Concatenation of ubyte[] to char[] works, but assignation doesn't

skilion via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Oct 4 09:13:47 PDT 2015


Is this allowed by the language or it is a compiler bug ?

void main() {
    char[] a = "abc".dup;
    ubyte[] b = [1, 2, 3];
    a = b;   // cannot implicitly convert expression (b) of type 
ubyte[] to char[]
    a ~= b;  // works
}


More information about the Digitalmars-d-learn mailing list