mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-09-17 19:07:05 +02:00
Merge DMD r320: refactor
--- dmd/expression.c | 7 +++---- dmd/expression.h | 2 +- dmd/mtype.c | 34 ++++++++-------------------------- 3 files changed, 12 insertions(+), 31 deletions(-)
This commit is contained in:
+3
-4
@@ -868,9 +868,7 @@ void functionParameters(Loc loc, Scope *sc, TypeFunction *tf, Expressions *argum
|
||||
{ TypeSArray *ts = (TypeSArray *)tb;
|
||||
Type *ta = ts->next->arrayOf();
|
||||
if (ts->size(arg->loc) == 0)
|
||||
{ arg = new NullExp(arg->loc);
|
||||
arg->type = ta;
|
||||
}
|
||||
arg = new NullExp(arg->loc, ta);
|
||||
else
|
||||
arg = arg->castTo(sc, ta);
|
||||
}
|
||||
@@ -2587,10 +2585,11 @@ void SuperExp::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
|
||||
|
||||
/******************************** NullExp **************************/
|
||||
|
||||
NullExp::NullExp(Loc loc)
|
||||
NullExp::NullExp(Loc loc, Type *type)
|
||||
: Expression(loc, TOKnull, sizeof(NullExp))
|
||||
{
|
||||
committed = 0;
|
||||
this->type = type;
|
||||
}
|
||||
|
||||
Expression *NullExp::semantic(Scope *sc)
|
||||
|
||||
Reference in New Issue
Block a user