Fix #77 - LDC1 fails to compile tango.io.vfs.ZipFolder.

I think the same rewrite for contract this should be valid in D1 - if I missed something crucial, feel free to revert.
This commit is contained in:
David Nadlinger
2012-06-02 19:21:13 +02:00
parent 509a5799ff
commit d24592b3e7

View File

@@ -1479,15 +1479,12 @@ DValue* ThisExp::toElem(IRState* p)
if (VarDeclaration* vd = var->isVarDeclaration()) {
LLValue* v;
Dsymbol* vdparent = vd->toParent2();
#if DMDV2
Identifier *ident = p->func()->decl->ident;
if (ident == Id::ensure || ident == Id::require) {
Logger::println("contract this exp");
v = p->func()->nestArg;
v = DtoBitCast(v, DtoType(type)->getPointerTo());
} else
#endif
if (vdparent != p->func()->decl) {
} else if (vdparent != p->func()->decl) {
Logger::println("nested this exp");
#if STRUCTTHISREF
return DtoNestedVariable(loc, type, vd, type->ty == Tstruct);