mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user