www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7816] New: non-virtual template methods in interface unsupported

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

           Summary: non-virtual template methods in interface unsupported
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dawg dawgfoto.de



cat > bug.d << CODE
class Foo
{
    final void fcall(T)(T t) { }
    static void scall(T)(T t) {}
}

interface Bar
{
    final void fcall(T)(T t) { }
    static void scall(T)(T t) {}
}

class Baz : Bar {}

void test()
{
    Foo foo; foo.fcall(2); foo.scall(2);
    Bar bar; bar.fcall(2); bar.scall(2);
    Baz baz; baz.fcall(2); baz.scall(2);
}
CODE

dmd -c bug.d

--------

Templates should be able to add methods that are proven
to be non-virtual. This already works for classes.

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


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 4174 ***

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