Mercurial > projects > dstress
changeset 1020:165fd0587328
static assert fails with recursive templates
<shro8822@uidaho.edu>
2006-05-23
news:bug-152-3@http.d.puremagic.com/bugzilla/
author | thomask |
---|---|
date | Wed, 24 May 2006 16:23:09 +0000 |
parents | d9dbc4d0698f |
children | ff4a389c86fb |
files | nocompile/a/assert_15_A.d nocompile/a/assert_15_B.d nocompile/a/assert_15_C.d nocompile/a/assert_15_D.d |
diffstat | 4 files changed, 72 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/assert_15_A.d Wed May 24 16:23:09 2006 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <shro8822@uidaho.edu> +// @date@ 2006-05-23 +// @uri@ news:bug-152-3@http.d.puremagic.com/bugzilla/ + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.a.assert_15_A; + +template T(int i){ + static assert(0); + const int T = T!(i-1); +} + +const int x = T!(1);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/assert_15_B.d Wed May 24 16:23:09 2006 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <shro8822@uidaho.edu> +// @date@ 2006-05-23 +// @uri@ news:bug-152-3@http.d.puremagic.com/bugzilla/ + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.a.assert_15_B; + +template T(){ + static assert(0); + const int T = T!(); +} + +const int x = T!();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/assert_15_C.d Wed May 24 16:23:09 2006 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <shro8822@uidaho.edu> +// @date@ 2006-05-23 +// @uri@ news:bug-152-3@http.d.puremagic.com/bugzilla/ + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.a.assert_15_C; + +template T(int i){ + static assert(0); + mixin T!(i-1); +} + +mixin T!(1);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/a/assert_15_D.d Wed May 24 16:23:09 2006 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <shro8822@uidaho.edu> +// @date@ 2006-05-23 +// @uri@ news:bug-152-3@http.d.puremagic.com/bugzilla/ + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.a.assert_15_D; + +template T(){ + static assert(0); + mixin T!(); +} + +mixin T!();