Fixed #85 — ICE with a non-POD local struct literal in a class method

This commit is contained in:
Alexey Prokhin
2012-03-06 10:47:24 +04:00
parent 120bf4429c
commit f6111f23f2

View File

@@ -2881,7 +2881,7 @@ DValue* StructLiteralExp::toElem(IRState* p)
#if DMDV2
else if (vd == sd->vthis) {
IF_LOG Logger::println("initializing vthis");
val = new DImValue(Type::tvoidptr, DtoBitCast(DtoNestedContext(loc, sd), getVoidPtrType()));
val = new DImValue(vd->type, DtoBitCast(DtoNestedContext(loc, sd), DtoType(vd->type)));
}
#endif
else