view run/in_out_body_03.d @ 1584:75358a6522ce

[Issue 1829] New: Inline assembler cannot get label addresses <burton-radons@shaw.ca> 2007-02-12 http://d.puremagic.com/issues/show_bug.cgi?id=1829
author thomask
date Fri, 22 Feb 2008 07:55:41 +0000
parents 6e4063f99377
children
line wrap: on
line source

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

// @author@	Buchan <kbuchan@xtra.co.nz>
// @date@	2004-11-14
// @uri@	news:opshfzxz0b44buww@simon.homenet
// @uri@	http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2262

// __DSTRESS_TORTURE_BLOCK__ -release

module dstress.run.in_out_body_03;

bool in_checked;
bool out_checked;

class MyClass{
	int i;
}

void outer(){
	MyClass inner()
	in{
		in_checked=true;
	}out (result){
		assert(result.i==1);
		out_checked=true;
	}body{
		MyClass s=new MyClass;
		s.i = 1;
		return s;
	}
	assert(inner.i==1);
}

int main(){
	outer();
	assert(in_checked);
	assert(out_checked);
	return 0;
}