view run/a/auto_14_A.d @ 1572:169ba9b6cb5d

[Issue 1013] Invalid code generated for naked functions with (u)long arguments <madou@madou.org> 2007-03-01 http://d.puremagic.com/issues/show_bug.cgi?id=1013
author thomask
date Thu, 21 Feb 2008 15:18:50 +0000
parents 902d2c168029
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);
}