Mercurial > projects > dstress
changeset 265:fd1663a1f2dd
new'ing a templated struct
zwang <nehzgnaw@gmail.com>
2005-02-03
news:cttjcg$44f$1@digitaldaemon.com
author | thomask |
---|---|
date | Thu, 03 Feb 2005 23:56:50 +0000 |
parents | fb4eff4ce900 |
children | 8a0f597f549a |
files | nocompile/bug_todt_194_A.d nocompile/bug_todt_194_B.d |
diffstat | 2 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/bug_todt_194_A.d Thu Feb 03 23:56:50 2005 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-02-03 +// @uri@ news:cttjcg$44f$1@digitaldaemon.com + +module dstress.nocompile.bug_todt_194_A; + +void main(){ + assert((new MyStruct!()).i==4); +} + +struct MyStruct(){ + int i=func(0).sizeof; +} + +int func(...); +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/bug_todt_194_B.d Thu Feb 03 23:56:50 2005 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ zwang <nehzgnaw@gmail.com> +// @date@ 2005-02-03 +// @uri@ news:cttjcg$44f$1@digitaldaemon.com + +module dstress.nocompile.bug_todt_194_B; + +void main(){ + assert(new MyStruct!().i==4); +} + +struct MyStruct(){ + int i=func(0).sizeof; +} + +int func(...); +