May 12, 2023
https://issues.dlang.org/show_bug.cgi?id=23917

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Something weird also happens when you try to pass it as a parameter to a ref function. A non-templated function works, but a function templated on the argument/return type fails!

///////////////////// test.d ////////////////////
struct NC { @disable this(this); }

struct A
{
    @property ref NC value() { assert(false); }
    alias value this;
}

A a;

ref NC f1(ref return NC value) { return value; }
auto ref NC get1() { return f1(a); } // OK

ref T f2(T)(ref return T value) { return value; }
auto ref NC get2() { return f2(a); } // Error
/////////////////////////////////////////////////

--
May 12, 2023
https://issues.dlang.org/show_bug.cgi?id=23917

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(Oops, ignore above comment, got my return types mixed up.)

--