www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 756] New: IFTI for tuples only works if tuple parameter is last

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

           Summary: IFTI for tuples only works if tuple parameter is last
           Product: D
           Version: 0.178
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: kamm incasoftware.de


The spec does not seem to require that tuple parameters are the last parameter
in the list, but this doesn't work:

void foo(U...)(int t, U u) { }
void bar(U...)(U u, int t) { }

void main()
{
  foo(1, 2, 3);  // Ok, IFTI works
  bar(1, 2, 3);  // error: cannot deduce template function from argument types
(int,int,int)
  bar!(int, int)(1, 2, 3);  // Ok.
}


-- 
Dec 27 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=756






This seems to be a root cause for quite a few recent bug reports.

Added to DStress as
http://dstress.kuehne.cn/run/t/tuple_13_A.d
http://dstress.kuehne.cn/run/t/tuple_13_B.d
http://dstress.kuehne.cn/run/t/tuple_13_C.d


-- 
Jan 01 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=756


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
           Keywords|                            |rejects-valid





Please remember to assign keywords to bug reports.  To everybody reading this:
Please look through issues you've reported and check for missing keywords.


-- 
Sep 18 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=756


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed dmd 1.028 and 2.012


-- 
Mar 06 2008