mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
16 lines
231 B
D
16 lines
231 B
D
// https://issues.dlang.org/show_bug.cgi?id=18746
|
|
|
|
struct S {}
|
|
|
|
S f(ref int i)
|
|
{
|
|
++i;
|
|
return S();
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int i = 2;
|
|
assert(f(i) == S());
|
|
assert(i == 3); /* failed before patch, i = 2; should pass */
|
|
}
|