Possible Bug?
Alex Rønne Petersen
alex at lycus.org
Wed Sep 12 20:18:58 PDT 2012
On 12-09-2012 22:59, Shripad K wrote:
> I have this code, which worked fine in dmd 2.058:
>
> private GC gc;
>
> private alias gc.malloc bson_malloc_func;
> private alias gc.realloc bson_realloc_func;
> private alias gc.free bson_free_func;
>
> With dmd 2.060 I get this error when I compile:
> Db/Bson.d(96): Error: variable Db.Bson.gc initializer required for type GC
>
> Am I doing something wrong?
>
> Shripad K
This is happening because the GC type in core.memory now has @disable
this(); in it, which disables its default constructor.
You're not supposed to instantiate it; it is effectively a static struct.
--
Alex Rønne Petersen
alex at lycus.org
http://lycus.org
More information about the Digitalmars-d
mailing list