--- struct T { template opDispatch(string name) { alias int Type; } } pragma(msg, T.opDispatch!("xxx"), " ", T.xxx); //(T).opDispatch!("xxx") (T).opDispatch!("xxx") pragma(msg, T.opDispatch!("xxx").Type, " ", T.xxx.Type); //int int pragma(msg, is(T.opDispatch!("xxx").Type), " ", is(Flag.xxx.Type)); //true false template U(T) { } void main() { T.opDispatch!("xxx").Type i1; //ok T.xxx.Type i2; //Error: T.xxx.Type is used as a type alias U!(T.opDispatch!("xxx").Type) U1; //ok alias U!(T.xxx.Type) U2; //Error: template instance U!(int) does not match template declaration U(T) } ---
https://github.com/D-Programming-Language/dmd/pull/447
https://github.com/D-Programming-Language/dmd/commit/24a34bba42fd48f191086c353bc2e61f93f0b950