[Issue 8598] New: [regression 2.059] Calling template function doesn't print instantiated line number

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 29 06:00:22 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8598

           Summary: [regression 2.059] Calling template function doesn't
                    print instantiated line number
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-08-29 06:00:18 PDT ---
This is an example code that has an error.

import std.stdio;
import std.algorithm;
import std.range;
import std.conv;

void main()
{
    "123".map(x => x.to!string).join("\n").writeln;   // test.d line 8
    //       ^ lack of '!'
}

Output:
C:\dmd2\src\phobos\std\algorithm.d(367): Error: template
std.algorithm.map(fun...) if (fun.length >= 1) is not a function template
C:\dmd2\src\phobos\std\algorithm.d(367): Error: template
std.algorithm.map(fun...) if (fun.length >= 1) cannot deduce template function
from argument types !()(string,void)

But, compiler should print second error "... cannot deduce template function
from ..." with the position test.d(8).

This is a regression of 2.059 which introduced by fixing bug 7768 and pull
#839.

-- 
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