Thread overview
[Issue 19906] __traits(isRef) always yields false for auto ref parameter
May 28, 2019
Manu
May 28, 2019
Sprink
May 28, 2019
Sprink
May 28, 2019
Manu
May 28, 2019
Manu
May 28, 2019
https://issues.dlang.org/show_bug.cgi?id=19906

Manu <turkeyman@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |turkeyman@gmail.com

--- Comment #1 from Manu <turkeyman@gmail.com> ---
Oh wow... isRef is unreliable?
I probably have *SO MUCH* broken code >_<

--
May 28, 2019
https://issues.dlang.org/show_bug.cgi?id=19906

Sprink <sprink.noreply@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sprink.noreply@gmail.com

--- Comment #2 from Sprink <sprink.noreply@gmail.com> ---
The issue here is specifically with is().

__traits(isRef, x) produces the correct value and works correctly if you remove
is().

--
May 28, 2019
https://issues.dlang.org/show_bug.cgi?id=19906

--- Comment #3 from Sprink <sprink.noreply@gmail.com> ---
Just to clarify the logic would still be incorrect.

It would always be true unless there was some kind of error in __traits().

--
May 28, 2019
https://issues.dlang.org/show_bug.cgi?id=19906

--- Comment #4 from Manu <turkeyman@gmail.com> ---
I suspect the `is` was an accident.

--
May 28, 2019
https://issues.dlang.org/show_bug.cgi?id=19906

--- Comment #5 from Manu <turkeyman@gmail.com> ---
Which is relieving, I was worried for a second there!

--
May 28, 2019
https://issues.dlang.org/show_bug.cgi?id=19906

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Andrei Alexandrescu <andrei@erdani.com> ---
Oops, my bad. Apologies.

--