[svn r186] Fixed 'delete this'.

This commit is contained in:
Tomas Lindquist Olsen
2008-05-06 03:46:43 +02:00
parent 93a632c7c2
commit 0269b4de6e
2 changed files with 4 additions and 3 deletions

View File

@@ -1987,7 +1987,8 @@ DValue* DeleteExp::toElem(IRState* p)
new llvm::FreeInst(val, p->scopebb());
}
}
new llvm::StoreInst(z, v->getLVal(), p->scopebb());
if (!v->isThis())
new llvm::StoreInst(z, v->getLVal(), p->scopebb());
}
else if (e1type->ty == Tarray) {
// must be on the heap (correct?)

View File

@@ -1,10 +1,10 @@
module tangotests.vararg1;
import tango.io.Stdout;
import tango.stdc.stdio;
void func(int[] arr...)
{
Stdout.formatln("1,2,4,5,6 == {},{},{},{},{}", arr[0],arr[1],arr[2],arr[3],arr[4]);
printf("1,2,4,5,6 == %d,%d,%d,%d,%d\n", arr[0],arr[1],arr[2],arr[3],arr[4]);
}
void main()