[Issue 7816] New: non-virtual template methods in interface unsupported
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 3 11:33:16 PDT 2012
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 at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at dawgfoto.de 2012-04-03 11:33:50 PDT ---
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: -------
More information about the Digitalmars-d-bugs
mailing list