(root)/
gcc-13.2.0/
gcc/
testsuite/
gdc.test/
runnable/
test19251.d
string result;

struct A
{
    int[] a;
    immutable(A) fun()
    {
        result ~= "Yo";
        return immutable A([7]);
    }

    alias fun this;
}

void main()
{
    A a;
    immutable A b = a;   // error: cannot implicitly convert expression a of type A to immutable(A)
    assert(result == "Yo");
}