Mercurial > projects > ldc
annotate tests/mini/delegate.d @ 884:a166ba5bdf2d
Automated merge with http://hg.dsource.org/projects/ldc
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 12 Jan 2009 07:51:39 +0100 |
parents | 8116660902c2 |
children |
rev | line source |
---|---|
514
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
1 class C { void foo() {} } |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
2 |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
3 void main() |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
4 { |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
5 C c = new C; |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
6 void delegate() dlg = &c.foo; |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
7 |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
8 assert(dlg); |
8116660902c2
Add test case for broken delegates. Also still needs fixing!
Christian Kamm <kamm incasoftware de>
parents:
diff
changeset
|
9 } |