# HG changeset patch # User thomask # Date 1116045663 0 # Node ID 3de87fd6e82d3c2aae14f55b95c77484039c3e02 # Parent ac20ba639b792ab2e3bf207437670a11de2d8b82 resolving static class methods xs0 2005-05-12 news:d5vnlr$9h6$1@digitaldaemon.com diff -r ac20ba639b79 -r 3de87fd6e82d run/s/static_30_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_30_A.d Sat May 14 04:41:03 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 +// @date@ 2005-05-12 +// @uri@ news:d5vnlr$9h6$1@digitaldaemon.com + +module dstress.run.s.static_30_A; + +class Foo{ + int hash(){ + return 0; + } + + static int hash(int val){ + return val+1; + } +} + +class Bar{ + int test(int i){ + return Foo.hash(i); + } +} + +int main(){ + assert(Foo.hash(10)==11); + Bar b = new Bar; + assert(b.test(10)==11); + return 0; +} diff -r ac20ba639b79 -r 3de87fd6e82d run/s/static_30_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_30_B.d Sat May 14 04:41:03 2005 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 +// @date@ 2005-05-12 +// @uri@ news:d5vnlr$9h6$1@digitaldaemon.com + +module dstress.run.s.static_30_B; + +class Foo{ + int hash(){ + return 0; + } + + static int hash(int val){ + return val+1; + } +} + +int main(){ + assert(Foo.hash(10)==11); + return 0; +} diff -r ac20ba639b79 -r 3de87fd6e82d run/s/static_30_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/s/static_30_C.d Sat May 14 04:41:03 2005 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 +// @date@ 2005-05-12 +// @uri@ news:d5vnlr$9h6$1@digitaldaemon.com + +module dstress.run.s.static_30_C; + +struct Foo{ + int hash(){ + return 0; + } + + static int hash(int val){ + return val+1; + } +} + +struct Bar{ + int test(int i){ + return Foo.hash(i); + } +} + +int main(){ + assert(Foo.hash(10)==11); + Bar b; + assert(b.test(10)==11); + return 0; +}