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))
Comment #1 by k.hara.pg — 2013-12-26T21:19:57Z
Comment #2 by github-bugzilla — 2013-12-26T23:28:37Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/55ebfd74a4c632024c3fb87a6623e5c14ded5660 fix Issue 8648 - No error line number with incomplete template https://github.com/D-Programming-Language/dmd/commit/3337cd5950b3baa2e27b761c0dabe6c43620554f Merge pull request #3035 from 9rnsr/fix8648 Issue 8648 - No error line number with incomplete template