Thread overview
[Issue 1970] New: Templated interfaces not matched
Apr 03, 2008
d-bugmail
Apr 24, 2008
d-bugmail
Feb 23, 2009
d-bugmail
Sep 03, 2010
Don
Sep 12, 2010
Walter Bright
April 03, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1970

           Summary: Templated interfaces not matched
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: caron800@googlemail.com


The following code won't compile:

    interface J(T) {}

    class A : J!(int) {}

    void foo(T)(J!(T) j) {}

    void main()
    {
       A a = new A;
       foo(a);
    }

The error is:
foo(T) does not match any function template declaration.

And yet it does. Change main to

    void main()
    {
       A a = new A;
       foo(cast(J!(int))a);
    }

and it compiles just fine. I contend that the explicit cast should not be necessary.


-- 

April 24, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1970


caron800@googlemail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major




------- Comment #1 from caron800@googlemail.com  2008-04-24 04:31 -------
Increased severity to major, as this issue is blocking progress on Phobos development.


-- 

February 23, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1970


dhasenan@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dhasenan@gmail.com




------- Comment #2 from dhasenan@gmail.com  2009-02-22 20:25 -------
This is related to #1715, I think -- at the very least, this would be a workaround for #1715 and #1714 if it worked.


-- 

September 03, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1970


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug@yahoo.com.au


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2010-09-03 11:27:33 PDT ---
The patch in bug 4173 also fixes this.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 12, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=1970


Walter Bright <bugzilla@digitalmars.com> changed:

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


--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2010-09-11 17:53:00 PDT ---
http://www.dsource.org/projects/dmd/changeset/675

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