Mercurial > projects > dstress
view run/i/inline_11_C.d @ 1091:9dcac8d4e97f
post DMD-0.163 review
author | thomask |
---|---|
date | Fri, 21 Jul 2006 11:15:26 +0000 |
parents | 1e6afb94ce6d |
children | b8c0195059d9 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Victor Nakoryakov <nail-mail@mail.ru> // @date@ 2005-06-25 // @uri@ news:d9e3af$1olf$1@digitaldaemon.com module dstress.run.i.inline_11_C; struct Struct{ int i; Struct foo(){ Struct s; int a = i; int b = s.i; with (s) { i+=2; } assert(a==i); assert(b+2==s.i); return s; } Struct bar(){ return Struct.foo(); } } int main(){ Struct s; assert(s.bar().i==2); return 0; }