Bug 11814 – Unnecessary error messages "does not match ..." on IFTI failure

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-24T18:45:00Z
Last change time
2013-12-30T17:23:35Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-12-24T18:45:11Z
From fail_compilation/fail190.d: T* f(T...)(T x) // line 1 { return null; } void main() { auto x = f(2,3,4); // line 7 *x = *x; } Prints: fail190.d(1): Error: can't have pointer to (int, int, int) fail190.d(7): Error: template instance fail190.f!(int, int, int) error instantiating fail190.d(7): Error: template fail190.f does not match any function template declaration. Candidates are: fail190.d(1): fail190.f(T...)(T x) fail190.d(7): Error: template fail190.f(T...)(T x) cannot deduce template function from argument types !()(int, int, int) But, f(2,3,4) at line 7 succeeds to deduce template parameter T, so printing "does not match ..." is essentially incorrect.
Comment #1 by k.hara.pg — 2013-12-24T19:50:46Z
Comment #2 by github-bugzilla — 2013-12-30T17:22:16Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d5bd4accda98143df17b1cec13ef08bfd20f695a fix Issue 11814 - Unnecessary error messages "does not match ..." on IFTI failure https://github.com/D-Programming-Language/dmd/commit/391a3d2186ccd612bc4ede603c820b68a7f9fb63 Merge pull request #3020 from 9rnsr/faildiag Issue 11813 & 11814 - improve diagnostic messages on IFTI failure