[Issue 12467] Regression (2.066 git-head): char[] is implicitly convertible to string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 25 10:21:50 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12467



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2014-03-25 18:21:49 CET ---
This regression makes the following code print garbage because of the way
stack-tracing works:

-----
string dupit(ref char[3] array)
{
    return array[];
}

void main()
{
    char[3] arr = "foo";
    string str = arr.dupit;
    assert(0, str);  // prints garbage
}
-----

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list