[Issue 2015] Interface template methods are allowed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 19 14:14:02 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2015
dvdfrdmn at users.sf.net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
Summary|Virtual template methods are|Interface template methods
|allowed |are allowed
------- Comment #2 from dvdfrdmn at users.sf.net 2008-04-19 16:14 -------
This actually came from a SourceForge bug report. The original specifies
interface methods. In this case, the code fails to link, but there should be a
proper error message.
----
interface TestInterface
{ void tpl(T)(); }
class TestImplementation : TestInterface
{ void tpl(T)() { } }
void main()
{
/* TestImplementation t = new TestImplementation(); // works */
TestInterface t = new TestImplementation(); // fails
t.tpl!(int)();
}
---
--
More information about the Digitalmars-d-bugs
mailing list