Mercurial > projects > dstress
view run/in_out_body_03.d @ 1487:6e4063f99377
changed nntp: URLs to http: URLs
author | thomask |
---|---|
date | Mon, 09 Apr 2007 12:29:15 +0000 |
parents | 52c9e86b6486 |
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; }