cannot implicitly convert char[] to string

vladde via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 15 04:25:18 PDT 2015


I made a PR to phobos where I modified `std.format.format`. 
https://github.com/D-Programming-Language/phobos/pull/3528

However the auto builder fails, with the error message:
> runnable/test23.d(1219): Error: cannot implicitly convert 
> expression (format("s = %s", s)) of type char[] to string

The line which fails is `p = std.string.format("s = %s", s);`

I don't understand why I can't convert a char[] to string.


More information about the Digitalmars-d-learn mailing list