[Issue 23458] New: No template candidates listed when OverDeclaration or OverloadSet don't match
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 4 15:23:36 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23458
Issue ID: 23458
Summary: No template candidates listed when OverDeclaration or
OverloadSet don't match
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: nick at geany.org
dmd should list overload candidates rather than just saying none of the
overloads are callable:
template Foo(T) if (is(T == int)) {}
template Bar(T) if (is(T == double)) {}
alias X = Foo;
alias X = Bar;
// in here, X is an OverDeclaration
template Mix1() { alias M = Foo; }
template Mix2() { alias M = Bar; }
mixin Mix1;
mixin Mix2;
alias Y = M;
// in here, Y is an OverloadSet
void main()
{
func("abc");
alias x = X!string;
alias y = Y!string;
}
PR incoming.
--
More information about the Digitalmars-d-bugs
mailing list