www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10346] New: No line number error with undefined template identifier

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10346

           Summary: No line number error with undefined template
                    identifier
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-06-12 15:07:14 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 12 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10346


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
           Platform|x86                         |All
         OS/Version|Windows                     |All


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-06-13 02:33:45 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2174

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 13 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10346



--- Comment #2 from github-bugzilla puremagic.com 2013-06-14 02:21:03 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 14 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10346


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 14 2013