[Issue 12150] Regression (2.063): char[] implicitly converts to string in .dup expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 13 02:12:35 PST 2014


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



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2014-02-13 02:12:32 PST ---
Here's the slightly reduced example code of where I ran into the issue:

-----
import std.file;

int parseCode(string code)
{
    return parseCode(code.dup);
}

int parseCode(ubyte[] code)
{
    return 0;
}

void main()
{
    parseCode(cast(ubyte[])std.file.read("test.d"));  // ok
    parseCode("foo");  // stack overflow
}
-----

-- 
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