D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21522 - function gets lost when aliasing an overloaded function template
Summary: function gets lost when aliasing an overloaded function template
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-01-03 05:46 UTC by Boris Carvajal
Modified: 2021-01-04 04:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Boris Carvajal 2021-01-03 05:46:54 UTC
test.d:
-------------------
void funA2()(int a) {}
void funA2(char a) {} // this function get lost
alias funA = funA2;
void funA(float b) {}

static assert(__traits(getOverloads, test, "funA", true).length == 3);
-------------------

Result:
Error: static assert:  `2LU == 3LU` is false


Note: stable shows "`0LU == 3LU` is false" due to issue 20821
Comment 1 Dlang Bot 2021-01-03 06:09:38 UTC
@BorisCarvajal created dlang/dmd pull request #12091 "Fix Issue 21522 - function get lost when aliasing an overloaded funct…" fixing this issue:

- Fix Issue 21522 - function get lost when aliasing an overloaded function template

https://github.com/dlang/dmd/pull/12091
Comment 2 Dlang Bot 2021-01-04 04:39:13 UTC
dlang/dmd pull request #12091 "Fix Issue 21522 - function gets lost when aliasing an overloaded funct…" was merged into master:

- 6299cc5a95e5fa4a4476710911672c2aed372f41 by Boris Carvajal:
  Fix Issue 21522 - function get lost when aliasing an overloaded function template

https://github.com/dlang/dmd/pull/12091