view run/in_out_body_02.d @ 1330:f3f715978184

Georg Wrede <georg@iki.fi> 2007-01-07 mail:45A120F5.1050108@iki.fi
author thomask
date Sat, 13 Jan 2007 10:33:49 +0000
parents 1e6afb94ce6d
children 52c9e86b6486
line wrap: on
line source

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

// @author@	Buchan <kbuchan@xtra.co.nz>
// @date@	2004-11-14
// @uri@	news:opshfzxz0b44buww@simon.homenet
// @url@	nntp://digitalmars.com/digitalmars.D.bugs/2262

// __DSTRESS_TORTURE_BLOCK__ -release

module dstress.run.in_out_body_02;

struct MyStruct{
	int i;
}

void outer(){
	MyStruct inner()
	in{
		assert(1);
	}out (result){
		assert(result.i==1);
	}body{
		MyStruct s;
		s.i = 1;
		return s;
	}
	assert(inner.i==1);
}

int main(){
	outer();
	return 0;
}