comparison tests/mini/delegate2.d @ 635:ce95d269bf5a

added test case for last commit (taking delegate of nested function of current function)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 02 Oct 2008 01:38:00 +0200
parents
children
comparison
equal deleted inserted replaced
634:0084d2c76b74 635:ce95d269bf5a
1 module mini.delegate2;
2
3 void main()
4 {
5 int foo = 42;
6 int bar()
7 {
8 return foo;
9 }
10 int delegate() dg = &bar;
11 assert(dg() == foo);
12 }