www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11814] New: Unnecessary error messages "does not match ..." on IFTI failure

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

           Summary: Unnecessary error messages "does not match ..." on
                    IFTI failure
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: k.hara.pg gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2013-12-24 18:45:11 PST ---
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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 24 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11814


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-12-24 19:50:46 PST ---
https://github.com/D-Programming-Language/dmd/pull/3020

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 24 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11814



--- Comment #2 from github-bugzilla puremagic.com 2013-12-30 17:22:16 PST ---
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

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11814


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2013