Mercurial > projects > dstress
annotate nocompile/delegate_03.d @ 1619:bebc7472a832
Fix #7.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 07 Nov 2009 18:55:30 +0100 |
parents | 1f6cf5ccfbc9 |
children |
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 | |
338 | 8 // __DSTRESS_ELINE__ 22 |
9 | |
155 | 10 module dstress.nocompile.delegate_03; |
11 | |
12 struct MyStruct{ | |
13 static int test(){ | |
14 return 3; | |
15 } | |
16 } | |
17 | |
18 int main(){ | |
19 int delegate() dl; | |
20 | |
21 MyStruct s; | |
22 dl = &s.test; | |
23 | |
24 return 0; | |
25 } |