digitalmars.D - Possible Bug?
- Shripad K (10/10) Sep 12 2012 I have this code, which worked fine in dmd 2.058:
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (8/17) Sep 12 2012 This is happening because the GC type in core.memory now has @disable
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
Sep 12 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 KThis 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 lycus.org http://lycus.org
Sep 12 2012