Change the frontend generated assert(this) or assert(&this) in D2 to set the ThisExp::var field.

This commit is contained in:
Tomas Lindquist Olsen
2009-06-03 13:11:01 +02:00
parent 060d18b91e
commit e31957dcd8

View File

@@ -1052,8 +1052,11 @@ void FuncDeclaration::semantic3(Scope *sc)
}
else
{ // Call invariant virtually
Expression *v = new ThisExp(0);
v->type = vthis->type;
ThisExp *tv = new ThisExp(0);
tv->type = vthis->type;
tv->var = vthis;
Expression* v = tv;
#if STRUCTTHISREF
if (ad->isStructDeclaration())
v = v->addressOf(sc);
@@ -1321,8 +1324,11 @@ void FuncDeclaration::semantic3(Scope *sc)
}
else
{ // Call invariant virtually
Expression *v = new ThisExp(0);
v->type = vthis->type;
ThisExp* tv = new ThisExp(0);
tv->type = vthis->type;
tv->var = vthis;
Expression *v = tv;
#if STRUCTTHISREF
if (ad->isStructDeclaration())
v = v->addressOf(sc);