Bug 23458 – No template candidates listed when OverDeclaration or OverloadSet don't match

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2022-11-04T15:23:36Z
Last change time
2022-11-05T01:11:43Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Nick Treleaven

Comments

Comment #0 by nick — 2022-11-04T15:23:36Z
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.
Comment #1 by dlang-bot — 2022-11-04T15:25:56Z
@ntrel created dlang/dmd pull request #14617 "Fix Issue 23458 - No template candidates listed when OverDeclaration …" fixing this issue: - Fix Issue 23458 - No template candidates listed when OverDeclaration or OverloadSet don't match https://github.com/dlang/dmd/pull/14617
Comment #2 by dlang-bot — 2022-11-04T17:12:43Z
@ntrel created dlang/dmd pull request #14618 "Don't use 'Candidate is' when there is more than one alias function overload" fixing this issue: - Fix Issue 23458 - No template candidates listed when OverDeclaration or OverloadSet don't match https://github.com/dlang/dmd/pull/14618
Comment #3 by dlang-bot — 2022-11-05T01:11:43Z
dlang/dmd pull request #14617 "Fix Issue 23458 - No template candidates listed when OverDeclaration …" was merged into master: - a957c61837160b48f2f4920ff1b1edf4ba7d1062 by Nick Treleaven: Fix Issue 23458 - No template candidates listed when OverDeclaration or OverloadSet don't match https://github.com/dlang/dmd/pull/14617