Mercurial > projects > dstress
annotate run/in_out_body_01.d @ 130:8b0b59f68b18
Buchan <kbuchan@xtra.co.nz>
news://opshfzxz0b44buww@simon.homenet
nttp://digitalmars.com/digitalmars.D.bugs:2262
author | thomask |
---|---|
date | Sun, 14 Nov 2004 18:27:03 +0000 |
parents | |
children | a33ad7189d21 |
rev | line source |
---|---|
130 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Buchan <kbuchan@xtra.co.nz> | |
6 // @date@ 2004-11-14 | |
7 // @uri@ news://opshfzxz0b44buww@simon.homenet | |
8 // @url@ nttp://digitalmars.com/digitalmars.D.bugs:2262 | |
9 | |
10 module dstress.run.in_out_body_01; | |
11 | |
12 struct MyStruct{ | |
13 int i; | |
14 } | |
15 | |
16 void outer(){ | |
17 MyStruct inner(){ | |
18 MyStruct s; | |
19 s.i = 1; | |
20 return s; | |
21 } | |
22 assert(inner.i==1); | |
23 } | |
24 | |
25 int main(){ | |
26 outer(); | |
27 return 0; | |
28 } |