http://d.puremagic.com/issues/show_bug.cgi?id=10847
Summary: uninitializedArray accepts arguments which make it
fail internally
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-08-18
17:14:13 PDT ---
-----
import std.array;
void main()
{
ubyte[] source = uninitializedArray!(ubyte[])(ulong.init);
}
-----
$ dmd test.d
C:\DMD\dmd2\windows\bin\..\..\src\phobos\std\array.d(321): Error: function
core.memory.GC.malloc (uint sz, uint ba = 0u) is not callable using argument
types (ulong, BlkAttr)
C:\DMD\dmd2\windows\bin\..\..\src\phobos\std\array.d(272): Error: template
instance std.array.arrayAllocImpl!(false, ubyte[], ulong) error instantiating
test.d(7): instantiated from here: uninitializedArray!(ubyte[], ulong)
test.d(7): Error: template instance std.array.uninitializedArray!(ubyte[],
ulong) error instantiating
The constraint should disallow the argument instead of failing inside of Phobos
when instantiating other templates.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------