D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10346 - No line number error with undefined template identifier
Summary: No line number error with undefined template identifier
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: diagnostic, pull
Depends on:
Blocks:
 
Reported: 2013-06-12 15:07 UTC by bearophile_hugs
Modified: 2013-06-14 08:54 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2013-06-12 15:07:14 UTC
This is wrong code:


struct Foo(T) {}
void bar(T x, T)(Foo!T) {}
void main() {
    Foo!int spam;
    bar!10(spam);
}


DMD 2.064alpha gives an error with no line number:

Error: undefined identifier T
test.d(5): Error: template test.bar does not match any function template declaration. Candidates are:
test.d(2):        test.bar(T x, T)(Foo!(T))
test.d(5): Error: template test.bar(T x, T)(Foo!(T)) cannot deduce template function from argument types !(10)(Foo!(int))
test.d(5): Error: template instance bar!(10) errors instantiating template
Comment 2 github-bugzilla 2013-06-14 02:21:03 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/8d8d9fca62e5f2270513becaa95a36c7fd79d216
fix Issue 10346 - No line number error with undefined template identifier

https://github.com/D-Programming-Language/dmd/commit/21c643dd168196f465d5db8e8c2d9ece7601a36f
Merge pull request #2174 from 9rnsr/fix10346

Issue 10346 - No line number error with undefined template identifier