[Issue 8648] New: No error line number with incomplete template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 13 04:09:23 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8648

           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 at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at 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;
    bar(x);
}


DMD 2.061alpha gives:

Error: undefined identifier n
temp.d(5): Error: template temp.bar does not match any function template
declaration
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: -------


More information about the Digitalmars-d-bugs mailing list