[Issue 20821] Aliased template method confuses overload resolution
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 12 05:10:46 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20821
--- Comment #3 from Basile-z <b2.temp at gmx.com> ---
maybe this report is invalid after all, try
---
struct S {
int gun()(int i) { return 0; }
alias fun() = gun; // note the parens...
int fun() { return 1; }
}
static assert(S().fun == 1); // OK
static assert(S().fun!()(0) == 0); // OK
static assert(__traits(getOverloads, S, "fun", true).length == 2); // OK
---
Maybe that the alias template parameters could be implictly created when the
alias RHS is not specialized.
--
More information about the Digitalmars-d-bugs
mailing list