Spin-off of bug 11718, comment 1. The original test case and reduced version are fixed, so this seems to be another issue.
---
cat > test.d << code
mixin template M()
{
struct S {}
}
mixin M!();
mixin M!();
alias S T; /* should generate an error about conflicting symbols */
code
echo "2.git:"; /home/nils/d/dmd2.git/dmd2/linux/bin64/dmd -c test.d
echo "2.064.2:"; /home/nils/d/dmd2.064.2/dmd2/linux/bin64/dmd -c test.d
echo "2.063.2:"; /home/nils/d/dmd2.063.2/dmd2/linux/bin64/dmd -c test.d
echo "2.062:"; /home/nils/d/dmd2.062/dmd2/linux/bin64/dmd -c test.d
echo "2.061:"; /home/nils/d/dmd2.061/dmd2/linux/bin64/dmd -c test.d
echo "2.060:"; /home/nils/d/dmd2.060/dmd2/linux/bin64/dmd -c test.d
echo "2.059:"; /home/nils/d/dmd2.059/dmd2/linux/bin64/dmd -c test.d
---
2.git:
test.d(3): Error: struct test.M!().S failed semantic analysis
test.d(6): Error: mixin test.M!() error instantiating
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at test.d(3)
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at test.d(3)
2.064.2:
test.d(3): Error: struct test.M!().S failed semantic analysis
test.d(6): Error: mixin test.M!() error instantiating
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at test.d(3)
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at test.d(3)
2.063.2:
dmd: struct.c:741: virtual void StructDeclaration::semantic(Scope*): Assertion `type->ty != Tstruct || ((TypeStruct *)type)->sym == this' failed.
Aborted (core dumped)
2.062:
2.061:
2.060:
2.059:
test.d(7): Error: test.M!().S at test.d(3) conflicts with test.M!().S at test.d(3)
---
2.059's behaviour is the correct one, as far as I can tell.