Mercurial > projects > dstress
changeset 209:e636fe6f12d6
static functions in interfaces
Miguel Ferreira Sim?es <Kobold@netcabo.pt>
2004-12-23
news:cqe7j0$2fl3$1@digitaldaemon.com
nntp://digitalmars.com/digitalmars.D/14003
author | thomask |
---|---|
date | Thu, 23 Dec 2004 21:29:16 +0000 |
parents | 278884e3a78d |
children | 54c661db561b |
files | compile/interface_08.d compile/interface_09.d reporter.txt run/interface_10.d run/interface_11.d |
diffstat | 5 files changed, 89 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/interface_08.d Thu Dec 23 21:29:16 2004 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Miguel Ferreira Simões <Kobold@netcabo.pt> +// @date@ 2004-12-23 +// @uri@ news:cqe7j0$2fl3$1@digitaldaemon.com +// @url@ nntp://digitalmars.com/digitalmars.D/14003 + +module dstress.compile.interface_08; + +interface ITest{ + static int dummy(); +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/interface_09.d Thu Dec 23 21:29:16 2004 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Miguel Ferreira Simões <Kobold@netcabo.pt> +// @date@ 2004-12-23 +// @uri@ news:cqe7j0$2fl3$1@digitaldaemon.com +// @url@ nntp://digitalmars.com/digitalmars.D/14003 + +module dstress.compile.interface_09; + +interface ITest{ + static int dummy(); +} + +class Test : ITest{ + static int dummy(){ + return 5; + } +}
--- a/reporter.txt Thu Dec 23 20:52:20 2004 +0000 +++ b/reporter.txt Thu Dec 23 21:29:16 2004 +0000 @@ -1,5 +1,6 @@ Thanks to all the bug reporters and for the test case suggestions. + Andy Friesen <andy@ikagames.com> Ant <duitoolkit@yahoo.ca> Arcane Jill <Arcane_member@pathlink.com> @@ -29,6 +30,7 @@ larrycowan <larrycowan_member@pathlink.com> Lars Ivar Igesund <larsivar@igesund.net> Lionello Lunesu <lionello.lunesu@crystalinter.remove.com> +Miguel Ferreira SimƵes <Kobold@netcabo.pt> Mike Swieton <mike@swieton.net> ndove http://www.dsource.org/forums/profile.php?mode=viewprofile&u=142 Oskar Linde <d98-oliRE.MO.VE@nada.kth.se>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/interface_10.d Thu Dec 23 21:29:16 2004 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Miguel Ferreira Simões <Kobold@netcabo.pt> +// @date@ 2004-12-23 +// @uri@ news:cqe7j0$2fl3$1@digitaldaemon.com +// @url@ nntp://digitalmars.com/digitalmars.D/14003 + +module dstress.run.interface_10; + +interface ITest{ + static int dummy(); +} + +class Test : ITest{ + static int dummy(){ + return 5; + } +} + +int main(){ + Test t = new Test(); + assert(t.dummy()==5); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/interface_11.d Thu Dec 23 21:29:16 2004 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Miguel Ferreira Simões <Kobold@netcabo.pt> +// @date@ 2004-12-23 +// @uri@ news:cqe7j0$2fl3$1@digitaldaemon.com +// @url@ nntp://digitalmars.com/digitalmars.D/14003 + +module dstress.run.interface_11; + +interface ITest{ + static int dummy(); +} + +class Test : ITest{ + static int dummy(){ + return 5; + } +} + +int main(){ + ITest t = new Test(); + assert(t.dummy()==5); + return 0; +}