Mercurial > projects > dstress
annotate nocompile/delegate_11.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_11; | |
8 | |
9 union MyUnion{ | |
10 static int test(){ | |
11 return b; | |
12 } | |
13 byte b; | |
14 } | |
15 | |
16 int main(){ | |
17 int delegate() dl; | |
18 | |
19 MyUnion u; | |
20 dl = &u.test; | |
21 | |
22 return 0; | |
23 } |