template MyTemplate(alias parameter) {}
alias MyVec = __vector(float[4]);
//x.d(6): Error: expression cast(__vector(float[4]))[nanF, nanF, nanF, nanF] is not a valid template value argument
//alias _ = MyTemplate!(MyVec.init);
//x.d(8): Error: found '.' when expecting ')' following template argument list
//x.d(8): Error: unexpected identifer 'init' in declarator
//x.d(8): Error: semicolon expected to close alias declaration
//x.d(8): Error: declaration expected, not ')'
//alias __ = MyTemplate!(__vector(float[4]).init);
Comment #1 by nick — 2023-02-19T21:33:54Z
Not just __vector:
alias a = MyTemplate!(int.init); // OK
alias a = MyTemplate!(int[].init); // NG
alias a = MyTemplate!(int[4].init); // NG
Comment #2 by nick — 2024-09-02T11:20:57Z
> alias a = MyTemplate!(int[].init); // NG
That one works as of 2.102.2.
> alias a = MyTemplate!(int[4].init); // NG
That one is still a parse error, but I filed it separately as issue 24740 as it applies to other contexts too.
Comment #3 by robert.schadek — 2024-12-13T18:47:40Z