Mercurial > projects > dstress
annotate nocompile/delegate_05.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
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_05; |
11 | |
12 class MyClass{ | |
13 static int test(){ | |
14 return 3; | |
15 } | |
16 } | |
17 | |
18 int main(){ | |
19 int delegate() dl; | |
20 | |
21 MyClass c; | |
22 dl = &c.test; | |
23 | |
24 return 0; | |
25 } |