| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail8373.d(21): Error: `fail8373.fun1` called with argument types `(int)` matches multiple overloads exactly: |
| 5 |
fail_compilation/fail8373.d(15): `fail8373.fun1!().fun1!int.fun1(int)` |
| 6 |
and: |
| 7 |
fail_compilation/fail8373.d(16): `fail8373.fun1!int.fun1(int)` |
| 8 |
fail_compilation/fail8373.d(22): Error: `fail8373.fun2` called with argument types `(int)` matches multiple overloads exactly: |
| 9 |
fail_compilation/fail8373.d(18): `fail8373.fun2!int.fun2(int)` |
| 10 |
and: |
| 11 |
fail_compilation/fail8373.d(19): `fail8373.fun2!().fun2!int.fun2(int)` |
| 12 |
--- |
| 13 |
*/ |
| 14 |
|
| 15 |
template fun1(a...) { auto fun1(T...)(T args){ return 1; } } |
| 16 |
auto fun1(T...)(T args){ return 2; } |
| 17 |
|
| 18 |
auto fun2(T...)(T args){ return 2; } |
| 19 |
template fun2(a...) { auto fun2(T...)(T args){ return 1; } } |
| 20 |
|
| 21 |
enum x1 = fun1(0); |
| 22 |
enum x2 = fun2(0); |