mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
20 lines
255 B
D
20 lines
255 B
D
// https://issues.dlang.org/show_bug.cgi?id=20401
|
|
|
|
void main()
|
|
{
|
|
int i;
|
|
assert(&passthrough(i) == &i);
|
|
}
|
|
|
|
ref int passthrough(return ref int i)
|
|
{
|
|
return get().flag ? i : i;
|
|
}
|
|
|
|
S get() { return S(); }
|
|
|
|
struct S
|
|
{
|
|
bool flag;
|
|
~this(){}
|
|
}
|