I want to do something like this:

----
template S(T) {
}

void main() {
pragma(msg, S!(int).T); // Error: no property `T` for type `void`
}
----

Using alias, it is possible to get T by another name:

----
template S(T) {
  alias t = T;
}

void main() {
  pragma(msg, S!(int).t);
}
----

But the same identifier cannot be used:

----
template S(T) {
alias T = T; // Error: `alias T = T;` cannot alias itself, use a qualified name to create an overload set
}

void main() {
  pragma(msg, S!(int).T);
}
----

Is there any nice way that `S!(int).T` works?

Reply via email to