What does this compile-time error mean?

Alexandr Druzhinin drug2004 at bk.ru
Sun Feb 24 00:42:33 PST 2013


This code:

import std.stdio;
import std.container;
import std.range;

auto main_cont = redBlackTree(iota(0, 100, 10).array);

void main() {

    writeln(main_cont.array);
}

at compilation with dmd 2.062 generates:

D:\applications\D\dmd2\windows\bin\..\..\src\druntime\import\core\memory.d(316): 
Error: gc_malloc cannot be interpreted at compile time, because it has 
no available source code
D:\applications\D\dmd2\windows\bin\..\..\src\phobos\std\array.d(321): 
      called from here: malloc(_param_0 * 4u, 2u)
D:\applications\D\dmd2\windows\bin\..\..\src\phobos\std\array.d(272): 
      called from here: arrayAllocImpl(_param_0)
D:\applications\D\dmd2\windows\bin\..\..\src\phobos\std\array.d(45): 
     called from here: uninitializedArray(r.length())
src\main.d(5):        called from here: array(iota(0, 100, 10))
src\main.d(5):        called from here: redBlackTree(array(iota(0, 100, 
10)))

Is it my error?


More information about the Digitalmars-d-learn mailing list