Mercurial > projects > dstress
annotate nocompile/delegate_10.d @ 155:2c9eb7937bb2
added delegate tests
author | thomask |
---|---|
date | Wed, 01 Dec 2004 07:23:29 +0000 |
parents | |
children | 1f6cf5ccfbc9 |
rev | line source |
---|---|
155 | 1 // $HeaderURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // delegates can only be initialized with non-static member functions | |
6 | |
7 module dstress.nocompile.delegate_10; | |
8 | |
9 union MyUnion{ | |
10 int test; | |
11 byte b; | |
12 } | |
13 | |
14 int main(){ | |
15 int delegate() dl; | |
16 | |
17 MyUnion u; | |
18 dl = &u.test; | |
19 | |
20 return 0; | |
21 } |