Properly handle DMD-internal "reference variables".

Previously, we just had a hack to make ref foreach statements work.
This commit enables them to work in other cases as well, like the
implicit __result variable for functions with out-contracts (which
is such a magic ref variable for ref-returning functions).

Fixes DMD testcase 'testcontracts'.
This commit is contained in:
David Nadlinger 2012-09-04 01:36:52 +02:00
parent 6b1b84a28d
commit ee4285f934
8 changed files with 173 additions and 172 deletions

View file

@ -31,7 +31,6 @@ IrGlobal::IrGlobal(VarDeclaration* v): IrVar(v)
IrLocal::IrLocal(VarDeclaration* v) : IrVar(v)
{
nestedIndex = -1;
byref = false;
}
//////////////////////////////////////////////////////////////////////////////