Bug 8648 – No error line number with incomplete template
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-13T04:09:00Z
Last change time
2013-12-26T23:44:55Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2012-09-13T04:09:40Z
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))