[Issue 9279] New: Static array return value implicitly converted to immutable dynamic array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 7 12:29:29 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9279
Summary: Static array return value implicitly converted to
immutable dynamic array
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: sludwig at outerproduct.org
--- Comment #0 from Sönke Ludwig <sludwig at outerproduct.org> 2013-01-07 12:29:25 PST ---
The following compiles without error:
---
char[2] b()()
{
char[2] ret;
return ret;
}
string a()
{
return b();
}
---
Changing b to a normal function causes the correct error message that an
implicit conversion of char[2u] to string is not possible.
Note that this affects std.digest.digest.toHexString(). Returnung
toHexString(digest) from a function will result in a corrupted string.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list