Summary: Constness lost when passing a struct member by alias
If we can't access a struct/class member passed by alias (hopefully, this will
be fixed some day), we at least should be able to get correct type information.
template Foo(T, alias u)
static assert(is(typeof(u) == T)); //fails
immutable s = S();
alias Foo!(typeof(s.x), s.x) foo;
The alias gets stripped of constness when passed to the template.