Mercurial > projects > dstress
changeset 200:5cc3c4e2a391
various template bugs
tetsuya <tetsuya_member@pathlink.com>
2004-13-13
news:cpk4vq$1m5a$1@digitaldaemon.com
nntp://news.digitalmars.com/digitalmars.D.bugs/2546
author | thomask |
---|---|
date | Wed, 15 Dec 2004 17:36:02 +0000 |
parents | 1a77f6d93b45 |
children | 96fb902700fe |
files | nocompile/template_09.d run/template_07.d run/template_08.d |
diffstat | 3 files changed, 70 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/template_09.d Wed Dec 15 17:36:02 2004 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ tetsuya <tetsuya_member@pathlink.com> +// @date@ 2004-13-13 +// @uri@ news:cpk4vq$1m5a$1@digitaldaemon.com +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2546 + +module dstress.nocompile.template_09; + +template T(){ + class T{ + static void foo() { + } + } +} + +int main(){ + T!()foo; // missing *DOT* !! + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/template_07.d Wed Dec 15 17:36:02 2004 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ tetsuya <tetsuya_member@pathlink.com> +// @date@ 2004-13-13 +// @uri@ news:cpk4vq$1m5a$1@digitaldaemon.com +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2546 + +module dstress.run.template_07; + +template T(){ + class A { + this() { + T!().a = this; + } + } + A a; +} + +int main(){ + mixin T!(); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/template_08.d Wed Dec 15 17:36:02 2004 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ tetsuya <tetsuya_member@pathlink.com> +// @date@ 2004-13-13 +// @uri@ news:cpk4vq$1m5a$1@digitaldaemon.com +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2546 + +module dstress.run.template_08; + +template T(){ + A a; + class A { + this() { + a = this; + } + } +} + +int main(){ + mixin T!(); + return 0; +}