Merge SiegeLord's dmdfe 1.064 patch.

This commit is contained in:
Robert Clipsham
2011-01-01 21:23:08 +00:00
parent 5e98bf3c49
commit 65c892ee62
18 changed files with 356 additions and 69 deletions

View File

@@ -1719,7 +1719,7 @@ Statement *ForeachStatement::semantic(Scope *sc)
if (!sc->func->vresult && tret && tret != Type::tvoid)
{
VarDeclaration *v = new VarDeclaration(loc, tret, Id::result, NULL);
v->noauto = 1;
v->noscope = 1;
v->semantic(sc);
if (!sc->insert(v))
assert(0);
@@ -2311,7 +2311,7 @@ Statement *IfStatement::semantic(Scope *sc)
Type *t = arg->type ? arg->type : condition->type;
match = new VarDeclaration(loc, t, arg->ident, NULL);
match->noauto = 1;
match->noscope = 1;
match->semantic(scd);
if (!scd->insert(match))
assert(0);
@@ -3427,7 +3427,7 @@ Statement *ReturnStatement::semantic(Scope *sc)
if (!fd->vresult)
{ // Declare vresult
VarDeclaration *v = new VarDeclaration(loc, tret, Id::result, NULL);
v->noauto = 1;
v->noscope = 1;
v->semantic(scx);
if (!scx->insert(v))
assert(0);