view run/a/auto_14_A.d @ 1380:902d2c168029

updates for DMD-1.007
author thomask
date Sun, 04 Mar 2007 11:01:08 +0000
parents 03b5056496f1
children
line wrap: on
line source

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

// @author@	Sean Kelly <sean@f4.ca>
// @date@	2006-01-24
// @uri@	news:dr5uqg$2hn7$1@digitaldaemon.com
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=704

module dstress.run.a.auto_14_A;

bool hadDtor = false;

auto class MyClass{
	this(){
		throw new Exception("dummy");
	}

	~this(){
		hadDtor = true;
		throw new Exception("should never throw");
	}
}

int main(){
	try{
		auto MyClass c;
		c = new MyClass();
	}catch{
		if(!hadDtor){
			return 0;
		}else{
			assert(0);
		}
	}

	assert(0);
}