https://issues.dlang.org/show_bug.cgi?id=21243

Andrei Alexandrescu <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Andrei Alexandrescu <[email protected]> ---
Example per Paul:

void main()
{
    alias f1(alias x) = () => x;
    int n = 123;
    assert(__traits(compiles, f!123())); // ok
    assert(__traits(compiles, f!n() = 456)); // no good  
}

If we add ref to the return value of the lambda, the other assertion fails.

--

Reply via email to