# HG changeset patch # User Tomas Lindquist Olsen # Date 1244027461 -7200 # Node ID 7d1e815b4f7618c282033e81b0cf95ef70a64c2f # Parent 630fc54f7c1e9ea34fdc4c2c8867ea3f0a84b8b4 Change the frontend generated assert(this) or assert(&this) in D2 to set the ThisExp::var field. diff -r 630fc54f7c1e -r 7d1e815b4f76 dmd2/func.c --- a/dmd2/func.c Wed Jun 03 12:32:35 2009 +0200 +++ b/dmd2/func.c Wed Jun 03 13:11:01 2009 +0200 @@ -1052,8 +1052,11 @@ } 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 @@ } 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);