I'm not sure, but this seems a bug:
class X(T...) if(T.length > 0)
{
T[0] foo()
{
return new T[0];
}
}
class A : X!A {}
Error: can't have array of (A)
Workaround:
class X(T...) if(T.length > 0)
{
T[0] foo()
{
alias T0 = T[0];
return new T0;
}
}
Comment #1 by k.hara.pg — 2015-08-10T17:21:29Z
*** Issue 14899 has been marked as a duplicate of this issue. ***