annotate tests/mini/delegate.d @ 834:f466f475b654

Added proper "need 'this' to access member foo" errors instead of "variable foo not resolved" for some cases, added FIXME for the old error! Added a bit more information to the runtime's cyclic dependency detection exception.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 09 Dec 2008 01:56:39 +0100
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 }