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