[Issue 9004] New: Wrong line number for undefined identifier error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 12 05:12:39 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9004
Summary: Wrong line number for undefined identifier error
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-11-12 05:12:35 PST ---
This is probably wrong code:
struct Foo(_T) {
alias _T T;
}
void bar(FooT)(FooT foo, FooT.T x) {
}
void main() {
Foo!int foo;
bar(foo, 1); // line 8
}
DMD 2.061alpha gives:
test.d(8): Error: undefined identifier FooT.T
test.d(8): Error: template test.bar does not match any function template
declaration
test.d(8): Error: template test.bar(FooT) cannot deduce template function from
argument types !()(Foo!(int),int)
Note the line number where the "undefined identifier FooT.T" error is.
--
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