mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Change the frontend generated assert(this) or assert(&this) in D2 to set the ThisExp::var field.
This commit is contained in:
14
dmd2/func.c
14
dmd2/func.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user