Mercurial > projects > dstress
view run/new_12.d @ 528:9e0847cf535a
pre DMD-0.123 review
Walter <walter@digitalmars.com>
2005-05-11
mail:00a301c5567d$489cbf20$0200a8c0@colossus
author | thomask |
---|---|
date | Thu, 12 May 2005 11:13:04 +0000 |
parents | ec6d35cccfb5 |
children | b3da1b510a19 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ module dstress.run.new_12; extern(C) void* malloc(size_t size); int counter; struct MyStruct{ int x; new(size_t size){ counter++; return malloc(size); } } int main(){ assert(counter==0); MyStruct* m=new MyStruct; m.x=1; assert(counter==1); return 0; }