Thread overview
[Issue 7425] New: IFTI does not work with inout methods
Feb 02, 2012
kennytm@gmail.com
Feb 05, 2012
kennytm@gmail.com
Feb 06, 2012
Walter Bright
February 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7425

           Summary: IFTI does not work with inout methods
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: kennytm@gmail.com


--- Comment #0 from kennytm@gmail.com 2012-02-02 09:55:30 PST ---
Test case:

------------------------------
struct S7425
{
    inout(int) g(T)(T x) inout
    {
        return x;
    }
    void test()
    {
        int f = g(2);  // line 9
    }
}
------------------------------

Compile with 'dmd -c test7425.d':

test7425.d(9): Error: template test7425.S7425.g(T) does not match any function
template declaration
test7425.d(9): Error: template test7425.S7425.g(T) cannot deduce template
function from argument types !()(int)

IFTI doesn't work when the method is 'inout'. It must be called as 'g!int(2)'. It works if this parameter is not 'inout', even if other parameters are 'inout'.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7425


kennytm@gmail.com changed:

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


--- Comment #1 from kennytm@gmail.com 2012-02-05 15:01:33 PST ---
Pull #698.

https://github.com/D-Programming-Language/dmd/pull/698

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7425


Walter Bright <bugzilla@digitalmars.com> changed:

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


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