annotate tests/mini/delegate.d @ 650:aa6a0b7968f7

Added test case for bug #100 Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 05 Oct 2008 17:28:15 +0200
parents 8116660902c2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 }