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

uplink.co...@googlemail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uplink.co...@googlemail.com
            Summary|Pass into template by alias |Passing aggregate types
                   |drops qualifier             |into templates by alias
                   |                            |drops qualifier

--- Comment #5 from uplink.co...@googlemail.com ---
The issue is not quite correct

struct Foo {}

template P(alias X)
{
    pragma(msg, X);
    enum P = 1;
}

int y = P!(const int);
int x = P!(immutable(double));
int z = P!(immutable(Foo));
int z2 = P!(immutable Foo);

The output of this is
const(int)
immutable(double)
Foo

What happens is that the types which are not symbols are merely "losslessly
cast" to a symbol.
Therefore the STC is not dropped

--

Reply via email to