Oops, the duplicate alias instruction and main are copy past error. It looks like the code was already too complex for me. ;) Here is the code I tested

----
import std.typecons;

Rebindable!(immutable TestImpl) Test;

class TestImpl
{
    void foo() {}
Test test() { __gshared x = new immutable TestImpl; return rebindable(x); }
}

void main()
{
    Test t = Test.test;
}
----

Reply via email to