From 4879a8bc17bce623e3fbd1bb5e74e1b194115274 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Tue, 13 Sep 2011 14:47:52 +0400 Subject: [PATCH] Fixed initialization of nested structs --- gen/toir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index fdcb7930..ed4c7164 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -2750,7 +2750,7 @@ DValue* StructLiteralExp::toElem(IRState* p) #if DMDV2 else if (vd == sd->vthis) { IF_LOG Logger::println("initializing vthis"); - val = new DImValue(sd->type, DtoNestedContext(loc, sd)); + val = new DImValue(Type::tvoidptr, DtoBitCast(DtoNestedContext(loc, sd), getVoidPtrType())); } #endif else