mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
22 lines
287 B
D
22 lines
287 B
D
module bug24;
|
|
|
|
struct S
|
|
{
|
|
long l;
|
|
float f;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
S s = S(3L,2f);
|
|
delegate {
|
|
S t = S(4L, 1f);
|
|
delegate {
|
|
s.l += t.l;
|
|
s.f += t.f;
|
|
}();
|
|
}();
|
|
printf("%lu %f\n", s.l, s.f);
|
|
assert(s.l == 7 && s.f == 3);
|
|
}
|