www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23447] New: wrong expression in error message when template

https://issues.dlang.org/show_bug.cgi?id=23447

          Issue ID: 23447
           Summary: wrong expression in error message when template
                    instance doesn't match any overload
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: nick geany.org

template T(X) {}
template T() {}

alias t = T!1; // line 17

templateoverload.d(17): Error: template `templateoverload.T` does not match any
template declaration
templateoverload.d(17):        Candidates are:
templateoverload.d(14):        T(X)
templateoverload.d(15):        T()

It should say 'template instance `T!1`'...

PR incoming.

--
Oct 31 2022