Bug 23645 – IFTI for templated overload set depends on order of overloads

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-01-20T21:40:12Z
Last change time
2024-12-13T19:26:49Z
Assigned to
No Owner
Creator
Paul Backus
Moved to GitHub: dmd#20216 →

Comments

Comment #0 by snarwin+bugzilla — 2023-01-20T21:40:12Z
As of DMD 2.101.2, the following program fails to compile: --- template f() { void f(T)(T t) {} void f(string s) {} } template g() { void g(string s) {} void g(T)(T t) {} } void main() { f(123); // ok g(123); // error } --- The error message is: --- bug.d(16): Error: none of the overloads of template `bug.g` are callable using argument types `!()(int)` bug.d(7): Candidate is: `g()(string s)` --- Note that the only difference between `f` and `g` is the order of the overloads inside the template.
Comment #1 by robert.schadek — 2024-12-13T19:26:49Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20216 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB