On Thursday, 6 September 2018 at 17:09:34 UTC, SrMordred wrote:
void foo(string s) {}

foo("this");

won't compile, since it won't make a String out of that immutable(char)[] literal without an explicit initialization of some sort.

//cannot pass argument "this" of type string to parameter String s
iep, this seems a real problem. ;/

You can sort of have custom literals like in C++

String s(object.string t){ return String(t); }

foo("this".s);

Reply via email to