diff --git a/gen/toir.cpp b/gen/toir.cpp index cdd659e0..08ed1641 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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?) diff --git a/tangotests/vararg1.d b/tangotests/vararg1.d index a3ad28b7..401020ce 100644 --- a/tangotests/vararg1.d +++ b/tangotests/vararg1.d @@ -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()