Mercurial > projects > dstress
view run/auto_07.d @ 431:61ec77e09b1e
auto dtor / inheritance
Sean Kelly <sean@f4.ca>
2005-04-14
news:d3kvo3$3uf$1@digitaldaemon.com
author | thomask |
---|---|
date | Fri, 15 Apr 2005 01:59:35 +0000 |
parents | |
children | c67acdbaf88e |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2005-04-14 // @uri@ news:d3kvo3$3uf$1@digitaldaemon.com module dstress.run.auto_07; int status; auto class Parent{ } auto class Child : Parent{ this(){ assert(status==0); status=1; } ~this(){ assert(status==1); status=2; } } void test(){ auto Parent o = new Child(); assert(status==1); } int main(){ test(); assert(status==2); return 0; }