view run/auto_06.d @ 799:c67acdbaf88e

Sean Kelly <sean@f4.ca> 2006-01-24 news:dr5uqg$2hn7$1@digitaldaemon.com
author thomask
date Wed, 25 Jan 2006 08:03:40 +0000
parents 8b1e3fb9c5a5
children ec5e144583ea
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

module dstress.run.auto_06;

int status;

auto class A{
	int cond;

	this(int cond){
		this.cond=cond;
	}

	~this(){
		assert(status==cond);
		status--;
	}
}

void test(){
	auto A a = new A(-1);
	auto A b = new A(0);
}

int main(){
	test();
	
	if(status==-2){
		return 0;
	}
}