Fixed an assert in DtoNewClass when initializing an inner-class outer reference

This commit is contained in:
Alexey Prokhin
2011-10-24 18:49:08 +04:00
parent bf463d61da
commit 66a30803f3

View File

@@ -165,7 +165,7 @@ DValue* DtoNewClass(Loc loc, TypeClass* tc, NewExp* newexp)
LLValue* dst = DtoGEPi(mem,0,idx,"tmp");
if (Logger::enabled())
Logger::cout() << "dst: " << *dst << "\nsrc: " << *src << '\n';
DtoStore(src, dst);
DtoStore(src, DtoBitCast(dst, getPtrToType(src->getType())));
}
// set the context for nested classes
else if (tc->sym->isNested() && tc->sym->vthis)