1 // Issue 76 - Using a non-template struct as a template
2 // Compiling leads to "Assertion failure: 's->parent' on line 1694 in file
3 // 'template.c'"
4 /*
5 TEST_OUTPUT:
6 ---
7 fail_compilation/fail104.d(26): Error: template instance `P!()` `P` is not a template declaration, it is a alias
8 fail_compilation/fail104.d(26): Error: mixin `fail104.C!(S).C.T!()` is not defined
9 fail_compilation/fail104.d(31): Error: template instance `fail104.C!(S)` error instantiating
10 ---
11 */
12 
13 struct S
14 {
TS15     template T()
16     {
17         void x(int i)
18         {
19         }
20     }
21 }
22 
C(P)23 class C(P)
24 {
25     mixin P!().T!();
26 }
27 
main(char[][]args)28 int main(char[][] args)
29 {
30     auto c = new C!(S);
31 
32     return 0;
33 }
34