view run/a/auto_14_B.d @ 1089:03b5056496f1

pre DMD-0.163 review
author thomask
date Wed, 19 Jul 2006 21:00:13 +0000
parents c67acdbaf88e
children 902d2c168029
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

module dstress.run.a.auto_14_B;

bool hadDtor = false;

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);
}