Mercurial > projects > dstress
view run/i/inline_11_D.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_D; struct Struct{ int i; Struct foo(){ Struct s; s.i=2; return s; } Struct bar(){ return Struct.foo() * Struct.foo(); } Struct opMul(Struct s){ Struct ss; ss.i = s.i * i; return ss; } } int main(){ Struct s; assert(s.bar().i==4); return 0; }