Consider: alias T = shared(const int); static if (is(T == shared(U), U)) pragma(msg, "works"); else static assert(0, "does not work"); This fails to compile. The compiler should peel the "shared" and bind U to const int. This code does work: alias T = shared(const int); static if (is(T == shared(const(U)), U)) pragma(msg, "works"); else static assert(0, "does not work");
I cannot reproduce this. Running the first version of the code yields "works". This seems to have been fixed.