mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-09-17 02:47:06 +02:00
added test case for last commit (taking delegate of nested function of current function)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
module mini.delegate2;
|
||||
|
||||
void main()
|
||||
{
|
||||
int foo = 42;
|
||||
int bar()
|
||||
{
|
||||
return foo;
|
||||
}
|
||||
int delegate() dg = &bar;
|
||||
assert(dg() == foo);
|
||||
}
|
||||
Reference in New Issue
Block a user