Mercurial > projects > dstress
annotate nocompile/delegate_03.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't be initialized with static member functions or | |
6 // non-member functions | |
7 | |
8 module dstress.nocompile.delegate_03; | |
9 | |
10 struct MyStruct{ | |
11 static int test(){ | |
12 return 3; | |
13 } | |
14 } | |
15 | |
16 int main(){ | |
17 int delegate() dl; | |
18 | |
19 MyStruct s; | |
20 dl = &s.test; | |
21 | |
22 return 0; | |
23 } |