d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag12487.d
blob8ea103eef41ebf0616f21650a1656aa0190772af
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag12487.d(15): Error: recursive expansion of template instance `diag12487.recTemplate!int`
5 fail_compilation/diag12487.d(25): Error: template instance `diag12487.recTemplate!int` error instantiating
6 fail_compilation/diag12487.d(18): Error: function `diag12487.recFunction` CTFE recursion limit exceeded
7 fail_compilation/diag12487.d(20): called from here: `recFunction(i)`
8 fail_compilation/diag12487.d(18): 1000 recursive calls to function `recFunction`
9 fail_compilation/diag12487.d(27): called from here: `recFunction(0)`
10 ---
13 template recTemplate(T)
15 enum bool recTemplate = recTemplate!T;
18 bool recFunction(int i)
20 return recFunction(i);
23 void main()
25 enum bool value1 = recTemplate!int;
27 enum bool value2 = recFunction(0);