www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8493] New: template parameter extraction fails for types returned from templated function

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

           Summary: template parameter extraction fails for types returned
                    from templated function
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



07:41:43 PDT ---
struct S(int x, int y) 
{
    void fun(T)(T t) 
        if (is(T U == S!(a, b), int a, int b))
    {
    }
}

 property S!(a, b) s(int a, int b)()
{
    return S!(a, b)();
}

void main() 
{
    auto s1 = S!(1, 1)();
    auto s2 = S!(2, 2)();  // comment out and you get errors
    auto s3 = s!(2, 2);
    s1.fun(s3);  // ok
}

If the second line in main is commented out the call to fun() fails.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 02 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8493


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

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



09:11:43 PST ---
Fixed in 2.061.

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