www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8648] New: No error line number with incomplete template


           Summary: No error line number with incomplete template
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

--- Comment #0 from bearophile_hugs eml.cc 2012-09-13 04:09:40 PDT ---
This program lacks "n" in the bar function template:

struct Foo(T, size_t n) {}
void bar(T, size_t )(Foo!(T, n)) {}
void main() {
    Foo!(int, 1) x;

DMD 2.061alpha gives:

Error: undefined identifier n
temp.d(5): Error: template temp.bar does not match any function template
temp.d(5): Error: template temp.bar(T,size_t) cannot deduce template function
from argument types !()(Foo!(int,1))

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2012