cannot implicitly convert char[] to string

Timon Gehr via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 15 04:54:45 PDT 2015


On 08/15/2015 01:25 PM, vladde wrote:
> 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.

Get rid of the 'in' in format's signature.


More information about the Digitalmars-d-learn mailing list