mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
17 lines
227 B
D
17 lines
227 B
D
module bug21;
|
|
|
|
void main()
|
|
{
|
|
int i = 42;
|
|
auto a = {
|
|
int j = i*2;
|
|
auto b = {
|
|
return j;
|
|
};
|
|
return b();
|
|
};
|
|
int i2 = a();
|
|
printf("%d\n", i2);
|
|
assert(i2 == i*2);
|
|
}
|