mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-18 05:05:22 +02:00
[svn r53] added basic support for delegate literals. if you access outer variables you get a broken module
This commit is contained in:
7
test/bug19.d
Normal file
7
test/bug19.d
Normal file
@@ -0,0 +1,7 @@
|
||||
module bug19;
|
||||
|
||||
void main()
|
||||
{
|
||||
auto dg = (int i) { return i*2; };
|
||||
assert(dg(2) == 4);
|
||||
}
|
||||
Reference in New Issue
Block a user