https://d.puremagic.com/issues/show_bug.cgi?id=12467
Summary: Regression (2.066 git-head): char[] is implicitly
convertible to string
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2014-03-25
18:20:51 CET ---
-----
string dupit(ref char[3] array)
{
return array[];
}
void main()
{
char[3] arr = "foo";
string str = arr.dupit;
assert(str.ptr !is arr.ptr); // oops
}
-----
DMD 2.065:
$ dmd test.d
> Error: cannot implicitly convert expression (array[]) of type char[] to string
DMD 2.066 git-head:
$ dmd test.d
> core.exception.AssertError@test(12): Assertion failure
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------