Can we disallow appending integer to string?
Nick Treleaven via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Apr 19 07:36:13 PDT 2017
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?
More information about the Digitalmars-d-learn
mailing list