Bug 8598 – [regression 2.059] Calling template function doesn't print instantiated line number

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-08-29T06:00:00Z
Last change time
2015-06-09T05:11:46Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-08-29T06:00:18Z
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.
Comment #1 by k.hara.pg — 2012-08-29T06:03:08Z
Comment #2 by github-bugzilla — 2012-09-03T01:19:58Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/440ced7ea23b377c9e261b128c78f9074c146842 fix Issue 8598 - Calling template function doesn't print instantiated line number https://github.com/D-Programming-Language/dmd/commit/f458a81531838dd3f0c31e2e680a541469d0d065 Merge pull request #1098 from 9rnsr/fix8598 Issue 8598 - [regression 2.059] Calling template function doesn't print instantiated line number
Comment #3 by nazriel6969 — 2012-09-05T01:56:24Z
Comment #4 by clugdbug — 2012-09-14T04:43:35Z
This isn't merged into D1 yet.
Comment #5 by k.hara.pg — 2012-09-23T18:52:33Z