Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3459 from 9rnsr/fix8373
Issue 8373 - IFTI fails on overloading of function vs non function template
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/fail8373.d(21): Error: fail8373.fun1 called with argument types (int) matches both: | ||
fail_compilation/fail8373.d(15): fail8373.fun1!().fun1!(int).fun1(int) | ||
and: | ||
fail_compilation/fail8373.d(16): fail8373.fun1!(int).fun1(int) | ||
fail_compilation/fail8373.d(22): Error: fail8373.fun2 called with argument types (int) matches both: | ||
fail_compilation/fail8373.d(18): fail8373.fun2!(int).fun2(int) | ||
and: | ||
fail_compilation/fail8373.d(19): fail8373.fun2!().fun2!(int).fun2(int) | ||
--- | ||
*/ | ||
|
||
template fun1(a...) { auto fun1(T...)(T args){ return 1; } } | ||
auto fun1(T...)(T args){ return 2; } | ||
|
||
auto fun2(T...)(T args){ return 2; } | ||
template fun2(a...) { auto fun2(T...)(T args){ return 1; } } | ||
|
||
enum x1 = fun1(0); | ||
enum x2 = fun2(0); | ||
|