This test case is faulty (as are the Dstress cases), it should be:
Template!(int) stack;
template Template(T) { alias int Template; }
This failed in 1.041, but is working in 1.046 and 2.031.
I bet this was fixed by bug#106 in 1.046.
Comment #3 by matti.niemenmaa+dbugzilla — 2009-08-19T09:49:00Z
Right you are; I checked and indeed, flipping the two lines doesn't make the code acceptable even with DMD 1.00. My bad, I presumably changed it from "class" to "template" at the last minute.
Confirmed that this is indeed fixed with 1.046: it didn't work in 1.045. Happy days! My code is riddled with "waiting on #810"-type comments.