September 13, 2012 [Issue 8648] New: No error line number with incomplete template | ||||
---|---|---|---|---|
| ||||
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@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; 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: ------- |
Copyright © 1999-2021 by the D Language Foundation