Mercurial > projects > dstress
view run/in_out_body_03.d @ 516:592f9ae41ba5
post DMD-0.122 review [1+2/n]
author | thomask |
---|---|
date | Tue, 10 May 2005 23:59:14 +0000 |
parents | e38919011244 |
children | 1e6afb94ce6d |
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 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; }