added test case for last commit (taking delegate of nested function of current function)

This commit is contained in:
Tomas Lindquist Olsen
2008-10-02 01:38:00 +02:00
parent d0ff4494ac
commit efab6b8f2a

12
tests/mini/delegate2.d Normal file
View File

@@ -0,0 +1,12 @@
module mini.delegate2;
void main()
{
int foo = 42;
int bar()
{
return foo;
}
int delegate() dg = &bar;
assert(dg() == foo);
}