template Test(TL...) { static if(TL.length == 1) alias TL[0] Test; else alias Test!(TL[1..$]) Test; } static assert(is(Test!(int,long,char[],ubyte) == ubyte));//ok static assert(Test!(1,2,3,4) == 4);//error: test.d(5): tuple TL is used as a type static assert(is(Test!(int,3,2,ubyte) == ubyte));//failed static assert(Test!(1,long,char[],4) == 4);//error: test.d(2): Error: long is not an expression // test.d(2): Error: char[] is not an expression
> static assert(is(Test!(int,3,2,ubyte) == ubyte));//failed -- This one was fixed in DMD1.010 or earlier. By DMD1.020, the other two cases display a correct error message: test.d(21): alias test.Test!(4).Test cannot alias an expression 4