On Wednesday, 19 April 2017 at 14:36:13 UTC, Nick Treleaven wrote:
This bug is fixed as the code no longer segfaults but throws instead:
https://issues.dlang.org/show_bug.cgi?id=5995

void main(){
        string ret;
        int i = -1;
        ret ~= i;
}

Why is it legal to append an integer?

Because integrals implicitly convert to characters of same width (byte -> char, short -> wchar, int -> dchar).

Reply via email to