www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2012] New: Another IFTI case that probably should work

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

           Summary: Another IFTI case that probably should work
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


void foo(T, U)(U u)
{    
}

void foo(T, A...)(A a)
{    
}

//import std.math;
void main()
{
    int x, y;

    // a 
    foo!(int)(x);
    // b
    foo!(int)(x, y);
}

(a) should instantiate the first template (and it actually does if the second
template is commented out). (b) should instantiate the second template.


-- 
Apr 19 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2012


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED
            Summary|Another IFTI case that      |Another IFTI case that
                   |probably should work        |probably should work


--- Comment #1 from yebblies <yebblies gmail.com> 2011-06-10 02:38:07 PDT ---
This seems to work in dmd2.053, the following prints:
a
b

------------

void foo(T, U)(U u)
{
    pragma(msg, "a");
}

void foo(T, A...)(A a)
{    
    pragma(msg, "b");
}

//import std.math;
void main()
{
    int x, y;

    // a 
    foo!(int)(x);
    // b
    foo!(int)(x, y);
}

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